Returns the next available character but does not consume it.
[Visual Basic] Overrides Public Function Peek() As Integer [C#] public override int Peek(); [C++] public: int Peek(); [JScript] public override function Peek() : int;
The next character to be read, or -1 if no more characters are available or the stream does not support seeking.
|ObjectDisposedException||The current reader is closed.|
This method overrides the TextReader.Peek method.
The current position of the StringReader is not changed by this operation.
The following table lists examples of other typical or related I/O tasks.
|To do this...||See the example in this topic...|
|Create a text file.||Writing Text to a File|
|Write to a text file.||Writing Text to a File|
|Read from a text file.||Reading Text from a File|
|Get the size of a file.||FileInfo.Length|
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard