Click here to Skip to main content
15,886,873 members

Comments by prajwal rao (Top 56 by date)

prajwal rao 18-Jan-13 8:24am View    
well thank you sir..... am trying to read only 4096 bytes data
prajwal rao 18-Jan-13 8:15am View    
how about this code
using System;
using System.IO;
using System.Text;

class Test
{
public static void Main()
{
string path = @"E:\\new.txt";
using (FileStream fs = File.OpenRead(path))
{
byte[] b = new byte[4096];
UTF8Encoding temp = new UTF8Encoding(true);

while (fs.Read(b, 0, b.Length) > 0)
{
Console.WriteLine(temp.GetString(b));
}
}
}
prajwal rao 18-Jan-13 7:11am View    
hmmmm ya i have visited it now sir......
can you give me a simplest method to read a file..... very short code.....
prajwal rao 18-Jan-13 6:53am View    
ya sir am using book to learn....
is there any different code to read a file other then the above code....???
prajwal rao 18-Jan-13 6:47am View    
ok...:(