I have the following, which creates a list of arrays:
static List<string[]> ReadFileIntoList(string fileName)
{
List<string[]> parsedData = new List<string[]>();
string fullLine;
string[] row;
try
{
StreamReader sr = new StreamReader(new FileStream(fileName, FileMode.Open, FileAccess.Read));
while ((fullLine = sr.ReadLine()) != null)
{
row = fullLine.Split('\t');
parsedData.Add(row);
}
sr.Close();
}
catch (Exception e)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(e.Message);
Console.WriteLine();
Console.ForegroundColor = ConsoleColor.Yellow;
}
return parsedData;
}
Once this list is created I need to add one additional element to the end of each array within the list and that one additional element will be coming from another list of floating point values; how can I do that?