public static Int32 InStr(int start, string string1, string string2) { if(start > 0 && string1.Length >= start) { int retValue = string1.IndexOf(string2, start - 1) + 1; return retValue; } else { return -1; } }