Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# get possition of a word in a string 1

Status
Not open for further replies.

o1568501

Programmer
Feb 8, 2005
14
GB
Hi,
Does anyone know how to get the integer position of a word in a stirng of text using c#?

Many thanks
 
Code:
string a = "myword";
int i = a.IndexOf("word");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top