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!

FileStream.Position

Gets the current position of this stream, or sets the current position of this stream to the given value.

[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

Get returns the current position of this stream.

Set sets the current position of this stream to the given value.

Exceptions

Exception Type Condition
NotSupportedException The stream does not support seeking.
IOException An I/O error occurs.
EndOfStreamException Seeking was attempted past the end of a stream that does not support this.

Remarks

The position cannot be set more than one byte beyond the end of the stream. You can set the position to just beyond the last byte so you can append to the file. Opening a new file and then writing to it requires this.

See Also

FileStream Class | FileStream Members | System.IO Namespace