plz guide me how can I view the content of a memory stream
in visual studio output window....? I know the encoding is utf-8..

plz help...

You could do this:

using System;
using System.Diagnostics;
using System.IO;

namespace DW_404824_CS_CON2
{
   class Program
   {
      static void Main(string[] args)
      {
         MemoryStream fileMem = new MemoryStream(new byte[] {5,1,2,3,4});
         int i = 0;

         while (-1 != (i = fileMem.ReadByte()))
         {
            //Console.WriteLine(i);
            Trace.WriteLine(i);
         }

         fileMem.Close();
      }
   }
}

For more on the MemoryStream class, you can view this.

thanks alot... it works...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.