title: Find the maximum length of every column in a csv file
body: <p>So, I was trying to present a csv document in a console application. However, due to the varying text size in it, the output was not in a presentable format.</p>
  
  <p>To present it, I tried to count the maximum length of text for each column and then append white space to the remaining text in that column so that there's equal length of characters in each column.</p>
  
  <p>I tried to get the character count, but can't seem to figure out how to proceed further.</p>
  
  <pre><code>var file = File.ReadAllLines(@"E:\File.csv");
  var lineList = file.Select(x =&gt; x.Split(',').ToList()).ToList();
  int maxColumn = lineList.Select(x =&gt; x.Count).Max(x =&gt; x);
  List&lt;int&gt; maxElementSize = new List&lt;int&gt;();
  for (int i = 0; i &lt; maxColumn; i++)
  {
      //Some Logic    
  }
  </code></pre>
  
  <p>Any help would be highly appreciated.</p>