reader class : reader(string,bool) fitter


Initializes and returns a new instance of reader class with file name and reading mode setting option.


new reader(string fullPath, bool readOnly)


stringfullPathThe complete file path.
boolreadOnlyA value that indicates reading mode.

Return value

readerAn instance that was initialized by specified value.

Sample code


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


It's a wrapper of the System.IO.StreamReader.StreamReader(String,Encoding) constructor. changed in ver

The Encoding is UTF-8.

You can specify detection of the Unicode byte order mark(BOM) with second argument. changed in ver

If true, detects a Unicode byte order mark(BOM). Otherwise, does nothing. changed in ver

You can specify the reading mode with second argument.

If true, open the file in Read Only mode. In this case, no exception occurs even if the file is opened by another process.

If false, an exception will occur if the file is open in another process.

The meaning of the second argument has been changed in Rtype.Reader.dll Ver

Links for reference

Copyright © Cooker All rights reserved.