NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

BufferedStream.Position

Determines the current position within the current stream.

[Visual Basic]
Overridable Public Property Position As Long
[C#]
public long Position {override get; override set;}
[C++]
public: __property virtual __int64 get_Position();
public: __property virtual void set_Position(__int64);
[JScript]
public function get Position() : long;
public function set Position(long);

Property Value

The current position within the current stream.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException value is negative.
IOException An I/O error occurs.
NotSupportedException The stream does not support seeking.
EndOfStreamException Seeking was attempted beyond the length of a stream that does not support this.

Remarks

The default implementation of the get accessor invokes Seek to obtain the current position within the underlying stream and then adjusts this value according to the current position within the buffer.

The default implementation of the set accessor copies any data previously written to the buffer to the underlying stream, and then invokes Seek.

Although some streams may allow the position to be set beyond the length of the stream, others may throw an exception.

See Also

BufferedStream Class | BufferedStream Members | System.IO Namespace | CanSeek