A long time ago, I remember using an utility which dumps all (ASCII/UTF8) strings from an executable file. I'm now wondering how could I go about implementing this in C#.
Currently, I use an external utility that dumps the strings to a file, and then I read that file from my application. I'd now like to replace the external utility with some sort of a parser in C#.
How does the dump strings utility detect UTF8 string in a file, and how can I implement this in C#?