Home > Code > C# > How to get csv or .dat file columns count in single line

How to get csv or .dat file columns count in single line

by John Prathip   on Feb 08, 2016   Category: C#   |  Views: 625    |  Points: 25   |  Silver 


string Originalfile=@"C:\Site125App\VCSEL_WaferReview\Sample\John.dat";
var lines = File.ReadAllLines(Originalfile);
var columns = lines[0].Split('\t').Count();


Post Code  |  Code Snippet Home

User Responses


No response found, be the first to review this code snippet.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts