hi
 
consider using this...
 
//@ the top
using System.Text.RegularExepressions
 
//inside a function
 
RegEx regex = new RegEx("Hello");
MatchCollection mc = regex.Matches(textBox1.Text);
MessageBox.Show(mc.Count);
 
hope this helps...
 
Mohamed Galal
 
 


shaheener <[EMAIL PROTECTED]> wrote:
i wanna make a c# program that counts the no. of words in a
sentence. i used the ".Length" method but this only counts the no.
of charcters. So please if anyone got the idea to count words i'd
appreciate it if he posted it.



Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to