HAY people
ive created the code as below but when i run the program it is displaying: system.Array[] or somthing like that instead of the value in the array.
I though it mite be a problem when converting the string[] to string but i cant seem to find a solution. any ideas???
public static void Main(string[] args)
{
string[] tracearray = Tracetoarray();
Console.Write(tracearray[0]);
Console.ReadKey();
}
private static string[] Tracetoarray()
{
string Trace = File.ReadAllText(@"C:\Users\Mark\Desktop\University\Final Year Project\TEST FILE.csv");
string[] Trace_Lines = Trace.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
int row = 5;
string[] TraceArray = new string[row];
for (int j = 0; j < Trace_Lines.Length-1; j++)
{
string TraceResults = Convert.ToString(Trace_Lines);
TraceArray[j] = TraceResults;
}
return TraceArray;
}
Thank you