IsolatedStorageFileStream.Position 속성

정의

현재 IsolatedStorageFileStream 개체의 현재 위치를 가져오거나 설정합니다.

public:
 virtual property long Position { long get(); void set(long value); };
public override long Position { get; set; }
member this.Position : int64 with get, set
Public Overrides Property Position As Long

속성 값

Int64

IsolatedStorageFileStream 개체의 현재 위치입니다.

예외

위치는 음수로 설정할 수 없습니다.

예제

다음 코드 예제에서는 속성을 사용하여 Position 파일에 데이터를 씁니다.

Console::WriteLine( "Writing data to the new file." );
while ( source->Position < source->Length )
{
   inputChar = (Byte)source->ReadByte();
   target->WriteByte( (Byte)source->ReadByte() );
}

// Determine the size of the IsolatedStorageFileStream
// by checking its Length property.
Console::WriteLine( "Total Bytes Read: {0}", source->Length.ToString() );
Console.WriteLine("Writing data to the new file.");
while (source.Position < source.Length)
{
    inputChar = (byte)source.ReadByte();
    target.WriteByte(inputChar);
}

// Determine the size of the IsolatedStorageFileStream
// by checking its Length property.
Console.WriteLine("Total Bytes Read: " + source.Length);
Console.WriteLine("Writing data to the new file.")
While source.Position < source.Length
    inputChar = CByte(source.ReadByte())
    target.WriteByte(inputChar)
End While

' Determine the size of the IsolatedStorageFileStream
' by checking its Length property.
Console.WriteLine(("Total Bytes Read: " & source.Length))

설명

이 속성 설정은 true속성이 .인 CanSeek 경우 작동합니다.

적용 대상