Read String ASCII from Stream - CSharp System.IO

CSharp examples for System.IO:Stream

Description

Read String ASCII from Stream

Demo Code


using System.Text;
using System.IO;//ww  w  .  j a  va2s .  co m

public class Main{
    public static string ReadStringASCII(this Stream stream, uint size)
    {
            return stream.ReadStringInternalStatic(Encoding.ASCII, size, false);
    }
    public static string ReadStringASCII(this Stream stream, uint size, bool trailingNull)
      {
            return stream.ReadStringInternalStatic(Encoding.ASCII, size, trailingNull);
      }
}

Related Tutorials