Tuesday, June 16, 2015

the painless modern way to read a flat file's copy to a bytes array in C#

byte[] bytes = File.ReadAllBytes(pathToFlatFile);
string[] pieces = ASCIIEncoding.ASCII.GetString(bytes).Split(",".ToCharArray());

No comments:

Post a Comment