reader class : reader(string,string) fitter

Description

Initializes and returns a new instance of reader class with file name and character encoding.

Syntax

new reader(string fullPath, string encodingName)

Arguments

ClassNameDescription
stringfullPathThe complete file path.
stringencodingNameEncoding name.

Return value

ClassDescription
readerAn instance that was initialized by specified value.

Sample code

1:

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

Notes

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

You can specify the encoding with second argument. The encoding will be specified by encoding name.

Does not detect a Unicode byte order mark(BOM).

Links for reference

Copyright © Cooker All rights reserved.