c# - Reading line by line from textfile -
I have a function in the C # class that is reading a text file in the streamfile. Here is the C # function.
public readFile (string filename, long startPosition = 0) {// open file as file _fileStream = new file stream (filename, filemod. Open, fileAccess.read, fileshare.readwrite ); _reader = New Stream Reader (_fileStream); // Set Start position _fileStream. Composition = startposition; } And I am trying to call this function in another category and read the file line by line.
Private AddContentReader _freader; Protected override zero (string [] Args) {_freader = New Added Content Reader (File); } So my question is how to read text file by row in the calling function
Please help me ..
is a method called readLine in the streamrider category. sample string line; While ((line = _reader.ReadLine ()) = null) {console.light line (line); } More info -
Comments
Post a Comment