Im new to C# and was wondering if there was a more elegant way to do the following:
thanks in advance for any help!
VB Code:
  1. if (ofd1.ShowDialog() == DialogResult.OK)
  2.             {
  3.                 System.IO.StreamReader objFile = new System.IO.StreamReader(ofd1.FileName);
  4.                 string[] arrFirst = objFile.ReadToEnd().Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
  5.                
  6.                 objFile.Close();
  7.                 objFile.Dispose();
  8.                 //int intUB = arrFirst.GetUpperBound(0);
  9.                 string[,] arrSecond;
  10.                 arrSecond = new string[ arrFirst.GetUpperBound(0),2];
  11.                 string[] arrTemp;
  12.                 arrTemp = new string[1];
  13.  
  14.                 for (int intCounter = 0; intCounter <= arrFirst.GetUpperBound(0) - 1; intCounter++)
  15.                 {
  16.                     arrTemp = arrFirst[intCounter].Split(',');
  17.                     arrSecond[ intCounter,0] = arrTemp[0];
  18.                     arrSecond[intCounter,1] = arrTemp[1];
  19.                 }
  20.  
  21.  
  22.             }