public void get_date()
{
string fileName = @"C:\adi.txt";
try
{
using (FileStream fs = File.OpenRead(fileName))
{
byte[] byteArray = new byte[1024];
UTF8Encoding fileContent = new UTF8Encoding(true);
while (fs.Read(byteArray, 0, byteArray.Length) > 0)
{
Console.WriteLine(fileContent.GetString(byteArray));
lblerror.Text=fileContent.GetString(byteArray));
}
}
}
catch (Exception Ex)
{
Console.WriteLine(Ex.ToString());
}
}
{
string fileName = @"C:\adi.txt";
try
{
using (FileStream fs = File.OpenRead(fileName))
{
byte[] byteArray = new byte[1024];
UTF8Encoding fileContent = new UTF8Encoding(true);
while (fs.Read(byteArray, 0, byteArray.Length) > 0)
{
Console.WriteLine(fileContent.GetString(byteArray));
lblerror.Text=fileContent.GetString(byteArray));
}
}
}
catch (Exception Ex)
{
Console.WriteLine(Ex.ToString());
}
}
No comments:
Post a Comment