C# MemoryStream SetLength

Description

MemoryStream SetLength Sets the length of the current stream to the specified value.

Syntax

MemoryStream.SetLength has the following syntax.


public override void SetLength(
  long value
)

Parameters

MemoryStream.SetLength has the following parameters.

  • value - The value at which to set the length.

Returns

MemoryStream.SetLength method returns

Example


using System.IO;//from  ww  w  . j  av  a2  s  . c o m
using System;
public class MainClass{
  public static void Main(String[] argv){  
    MemoryStream memStream = new MemoryStream();
    memStream.SetLength(10);
    
  }
}




















Home »
  C# Tutorial »
    System.IO »




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