James

James

  • NA
  • 2
  • 0

Help with encoding and syntax

Nov 18 2007 5:19 PM
Hi,

I'm new to C# so please forgive this basic question.

I would like to insert a variable into the line below at System.Text.Encoding.Unicode

TextWriter tw = new streamWriter(fileName,false,System.Text.Encoding.Unicode);

I also want to use the following as variables:
System.Text.Encoding.ASCII
System.Text.Encoding.UTF8

I would like to assign each encoding as a variable so I can insert the variable I require.

Example:
TextWriter tw = new streamWriter(fileName,false,myVerUnicode);

How do I go about declaring the variables and using the variable in the above line?

Many thanks.

Answers (1)