reader class : Peek() method

Description

Returns a next available character.

Syntax

readerInstance.Peek()

Arguments

None.

Return value

ClassDescription
stringA next available character.

Sample code

1:

reader r = new reader("c:\somewhere...\sample.txt");

2:

string next = r.Peek();

Notes

It's a wrapper of the System.IO.StreamReader.Peek() method.

Returns a string that represents the next character. If returned empty string, there is not a next character or the stream does not support seeking .

The current position of the reader is not changed by Peek().

Links for reference

Copyright © Cooker All rights reserved.