Solved

is there a command that checks how many strings are within an array as follow

Posted on 2008-10-14
2
196 Views
Last Modified: 2013-12-17
is there a command that would check how many items (in this example -- word items) there are in the following array :: GlobalVars._inputWords
private static string[] inputWords;
 

        public static string[] _inputWords

        {

            get { return inputWords; }

            set { inputWords = value; }

        }
 

public static void removeAllNonAlphaTextFromString(string inputText)

        {

            GlobalVars._inputWords =

                inputText.Split(new char[] { ' ', ',', ';', '.', '-', '/', '|', '\\',

                                             '%', '#', '@', '!', '~', '$', '^', '(',

                                             ')', '+', '[', ']', '{', '}', '"', ':', 

                                             '<', '>', '?',  '\r', '\n', '*' }, StringSplitOptions.RemoveEmptyEntries);        
 

                foreach (string inputWord in GlobalVars._inputWords)

                    Console.WriteLine(inputWord);       

        }

Open in new window

0
Comment
Question by:amillyard
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 22716836
GlobalVars._inputWords.Length
0
 

Author Closing Comment

by:amillyard
ID: 31506122
jaime_olivares:  excellent -- many thanks :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now