i m new to C# world...learning c# through Video tutorials... i learned how to input a file by giving path of the file...but my program is not completely showing complete file means to say that whatever a .txt file contanis is not showing...this is my code
using System;
using System.IO;
class FileInput
{
public static void Main()
{
string Path = null;
Console.WriteLine("Please Enter The Path of the TXT File You Want See : ");
Path = Console.ReadLine();
StreamReader r = File.OpenText(Path);
for (int i = 0; i < 20; i++)
{
Console.WriteLine(r.ReadLine());
if (r.ReadLine() != null)
{
i = i;
}
else
{
i = 19;
}
}
}
}
please help me to learn c# Thanks...

New Topic/Question
Reply




MultiQuote




|