Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a textbox whose text is of the format,
Everyday Academy, delta.
I need to select only the words or phrase before the comma ','. Can anyone assist me with how to do that please?
Posted

Go to MSDN and learn the various methods of the string class.
 
Share this answer
 
Comments
EasyHero 3-Feb-15 16:23pm    
Thanks man, this worked. i used the IndexOf method to search for d char ',' then i used the remove method to remove all characters from that position till the end of the string.
reading was an eye opener. was looking in the wrong places earlier. was actually looking for solution amongst the methods of textbox class
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900