Read File Data with FileStream - CSharp File IO

CSharp examples for File IO:FileStream

Description

Read File Data with FileStream

Demo Code


using System.IO ;
using System.Windows.Forms ;
using System;/* www .ja v  a 2 s. co m*/

public class Main{
      public static void ReadFileData(FileStream fs, byte[] buff, int count ,int offset)
      {
         int readCount = 0;
         while (readCount < count)
         {
            int read = fs.Read(buff, offset + readCount, count - readCount);
            readCount += read;
         }

         return;
      }
}

Related Tutorials