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

Description

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

Syntax

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

Arguments

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

Return value

ClassDescription
readerA reader type instance that was initialized by specified value.

Sample code

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

Notes

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.