private static bool TextEquals( string array, char[] text, int start ) { // use array.Length to eliminate the rangecheck for ( int i = 0; i < array.Length; i++ ) { if ( array[i] != text[start+i] ) { return false; } } return true; } }