I need to know is there some string at exact location on the .txt file.
I know how to found concrete string with Contains method, but since I do not need to search whole file (string will always be on the same location) I’m trying to find quickest solution.
if (searchedText.Contains(item))
{
Console.WriteLine("Found {0}",item);
break;
}
Thanks
If it’s in UTF-8 and isn’t guaranteed to be ASCII, then you’ll just have to read the relevant number of characters. Something like:
Notes: