MemoryStream.Length 속성
정의
스트림의 길이(바이트)를 가져옵니다.Gets the length of the stream in bytes.
public:
virtual property long Length { long get(); };
public override long Length { get; }
member this.Length : int64
Public Overrides ReadOnly Property Length As Long
속성 값
스트림의 길이(바이트)입니다.The length of the stream in bytes.
예외
스트림이 닫혔습니다.The stream is closed.
예제
이 코드 예제는에 대해 제공 된 큰 예제의 일부는 MemoryStream 클래스입니다.This code example is part of a larger example provided for the MemoryStream class.
// Write the stream properties to the console.
Console::WriteLine( "Capacity = {0}, Length = {1}, "
"Position = {2}\n", memStream->Capacity.ToString(), memStream->Length.ToString(), memStream->Position.ToString() );
// Write the stream properties to the console.
Console.WriteLine(
"Capacity = {0}, Length = {1}, Position = {2}\n",
memStream.Capacity.ToString(),
memStream.Length.ToString(),
memStream.Position.ToString());
' Write the stream properties to the console.
Console.WriteLine( _
"Capacity = {0}, Length = {1}, Position = {2}", _
memStream.Capacity.ToString(), _
memStream.Length.ToString(), _
memStream.Position.ToString())