Hi,
i have a txt file that i want to read from the program and add it to a queue.
how to i read part of the file (say for ex 50 characters each) and put it to a queue.
the file contains a story.
string filePath = "C:\\";
try
{
using (StreamReader sr = new StreamReader(filePath + "file.txt"))
{
String line = sr.ReadToEnd();
Console.WriteLine(line);
Console.ReadLine();
}
}
catch (Exception e)
{
Console.WriteLine("The file could not be read:");
Console.WriteLine(e.Message);
}
i got it to read it to the console how do i write to a queue.
appreciate a reply
thanks