Thursday, 15 July 2010

c# - Read random string from a file without reading all file -



c# - Read random string from a file without reading all file -

how read random line file without reading file?

i tried filestream class , seek, read functions. didn't luck 100% working method.

this isn't possible line defined carriage homecoming or line break. there no way know how many lines there in file without reading of unless know construction of file; example, every line 80 characters. in case you're picking random 80 characters file of length n, in case filestream seek way go.

c# file io

No comments:

Post a Comment