writer class : writer(string,string) fitter

Description

Gets a new instance of writer class which is initialized with the file path and encoding.

Syntax

new writer(string fullPath, string encodingName)

Arguments

ClassNameDescription
stringfullPathThe complete file path.
stringencodingNameThe encoding name.

Return value

ClassDescription
writerA new instance of writer class that is initialized by specified value.

Sample code

1:

writer w = new writer("c:\somewhere...\sample.txt", "shift_jis");

Notes

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

Creates an instance of the writer class with the encoding specified by the second argument. Encoding will be specified by the encoding name.

The instance that was created is initialized as overwrite mode.

Links for reference

Copyright © Cooker All rights reserved.