Did you make a counter that counts where it found the data?
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
So, without the file processing, think about this:
Each row will need the counter attached multiple times.
Each line will need to be split, then modified, then re-assembled:
using System;
using System.Collections.Generic;
namespace DW_407604_CS_CON
{
class Program
{
static void Main(string[] args)
{
string[] arr_str =
{ //pretend this came from the file into an array
"2365 6598 8745 5648",
"5421 5784 9657 4562"
};
int iCounter = 0;
foreach (string s in arr_str)
{
List<string> lst_strStack = new List<string>();
string[] arr_strInternal = s.Split(" ".ToCharArray(),
StringSplitOptions.RemoveEmptyEntries);
foreach (string strInternal in arr_strInternal)
{
lst_strStack.Add(++iCounter + ":" + strInternal);
}
Console.WriteLine(string.Join(" ", lst_strStack.ToArray()));
}
}
}
}
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402