MemoryStream.Write : Memory Stream : File Stream C# Source Code


Custom Search

C# Source Code » File Stream » Memory Stream »

 

MemoryStream.Write








    
 
using System;
using System.IO;

public class MemTest {
    public static void Main() {
        MemoryStream memOut = new MemoryStream();

        byte[] bs = { 1, 2, 3, 4, 5, 6 };
        memOut.Write(bs, 0, bs.Length);

        memOut.Seek(+3, SeekOrigin.Begin);
        byte b = (byte)memOut.ReadByte();
        Console.WriteLine("Value: " + b);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo File Stream
» Memory Stream