I want to check whether Value1 below contains \"abc\" within the first X characters. How would you check this with an if statement?
Value1
if
I would use one of the of the overloads of the IndexOf method
bool found = Value1.IndexOf("abc", 0, 7) != -1;