Share via


TextSnapshotToTextReader.Peek Method

Returns the next character without changing the state of the reader or the character source.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

'Declaration
Public Overrides Function Peek As Integer
public override int Peek()
public:
virtual int Peek() override
abstract Peek : unit -> int  
override Peek : unit -> int
public override function Peek() : int

Return Value

Type: System.Int32
The next character to be read, or -1 if no more characters are available, or if the stream does not support seeking.

Exceptions

Exception Condition
ObjectDisposedException

The reader is closed.

.NET Framework Security

See Also

Reference

TextSnapshotToTextReader Class

Microsoft.VisualStudio.Text Namespace