asp.net - How to read character by character from text file? -
how read character character in line text file?
use straemreader class. has read() method reads next character input stream , advances character position 1 character. (overrides textreader.read().)
for example:
using (streamreader sr = new streamreader(path)) { while (sr.peek() >= 0) { char c = (char)sr.read(); } }
Comments
Post a Comment