C# MemoryStream CanRead

Description

MemoryStream CanRead Gets a value indicating whether the current stream supports reading.

Syntax

MemoryStream.CanRead has the following syntax.


public override bool CanRead { get; }

Example


using System.IO;/*  ww w.j  a  v  a2s .c  om*/
using System;
public class MainClass{
  public static void Main(String[] argv){  
    MemoryStream ms = new MemoryStream();
    System.Console.WriteLine(ms.CanRead);
  }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.IO »




BinaryReader
BinaryWriter
Directory
DirectoryInfo
DriveInfo
File
FileInfo
FileStream
MemoryStream
Path
StreamReader
StreamWriter
StringReader
StringWriter