Click here to Skip to main content
15,911,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
ReadFromFile(@"D:\Depths.txt");

}
static void ReadFromFile(string aTextFile)
{
System.IO.StreamReader InputFile = new System.IO.StreamReader(aTextFile);

string s;
while (!InputFile.EndOfStream)
{
s = InputFile.ReadLine();
Console.WriteLine(s);


}
{

ReadFromFile(@"speed.txt");
}
static void ReadFromFile(string TextFile)
{
System.IO.StreamReader nputFile = new System.IO.StreamReader(TextFile);

string x;
while (!nputFile.EndOfStream)
{
x = nputFile.ReadLine();
Console.WriteLine(x);

}

What I have tried:

I need to read both files in the same code and need them both to appear on the screen when I debug
Posted
Updated 4-Dec-17 19:50pm

1 solution

string FileNumberOne = System.IO.File.ReadAllText(@"D:\Depths.txt");

string FileNumberTwo = System.IO.File.ReadAllText(@"speed.txt");


You sure will see the value of variables in debug.
:-)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900