I have a text file and I need to put all even lines to Dictionary Key and all even lines to Dictionary Value. What is the best solution to my problem?
int count_lines = 1;
Dictionary<string, string> stroka = new Dictionary<string, string>();
foreach (string line in ReadLineFromFile(readFile))
{
if (count_lines % 2 == 0)
{
stroka.Add Value
}
else
{
stroka.Add Key
}
count_lines++;
}