Hello,
in my program i want to read data from text file and display the data as keyvalue pair using console application.
i am using below code to read the data
{
string[] lines = System.IO.File.ReadAllLines(@"C:\Users\ramy\desktop\grocery billing.txt");
System.Console.WriteLine("Contents of grocery billing.txt :");
foreach (string line in lines)
{
Console.WriteLine(line);
// Console.WriteLine(",", line);
}
Console.Write("press enter key to exit");
Console.Read();
break;
}
how to display the data as keyvalue pairs? any idea how to proceed
Thanks in advance