   Find a sub string in a string (C#)
  I am strugling to find the appropriate method for locating an instance of a string within a stringfor exampleis there a function to do the followingstring s1 = "This is some text"string s2 = "some"if(Compare(s1, s2)){do something;}Thanks guys 
  I think "int position=s1.IndexOf(s2)" should do the trick, can''t check that right now because I am not at home, but I am fairly sure it works. ;  MSDN is your friend. 