Home Cooker Classes Others Rice CookerGX
Classes  >  reader  >  reader(string,int,bool)
reader class : reader(string,int,bool) fitter


Initializes a new instance of reader type for the specified file name, with the specified encoding and the specified byte order mark detection option.


new reader(string fullPath, int codePageID, bool detectBOM)


stringfullPathThe complete file path.
intcodePageIDA code page identifier.
booldetectBOMA value that indicates whether detect the BOM.

Return value

readerA reader type instance that was initialized by specified value.

Sample code

reader readerInstance = new reader("c:\Users\....\tagget.txt", 932, true);//shift_jis


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

You can specify the encoding with second argument. The encoding will be specified by code page identifier.

You can specify detection of the Unicode byte order mark(BOM) with third argument.

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

Links for reference

Copyright © Rice All rights reserved.