Freigeben über


IsolatedStorageFileStream.Position-Eigenschaft

Ruft die aktuelle Position des aktuellen IsolatedStorageFileStream-Objekts ab oder legt diese auf den angegebenen Wert fest.

Namespace: System.IO.IsolatedStorage
Assembly: mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Overrides Property Position As Long
'Usage
Dim instance As IsolatedStorageFileStream
Dim value As Long

value = instance.Position

instance.Position = value
public override long Position { get; set; }
public:
virtual property long long Position {
    long long get () override;
    void set (long long value) override;
}
/** @property */
public long get_Position ()

/** @property */
public void set_Position (long value)
public override function get Position () : long

public override function set Position (value : long)

Eigenschaftenwert

Die aktuelle Position dieses IsolatedStorageFileStream-Objekts.

Ausnahmen

Ausnahmetyp Bedingung

ArgumentOutOfRangeException

Für die Position kann keine negative Zahl festgelegt werden.

Hinweise

Das Festlegen dieser Eigenschaft ist möglich, wenn die CanSeek-Eigenschaft true ist.

Beispiel

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))
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 = (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() );

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

IsolatedStorageFileStream-Klasse
IsolatedStorageFileStream-Member
System.IO.IsolatedStorage-Namespace