Encoding and text file

The following code writes to the file using unicode encoding.


using System;
using System.Text;
class Sample
{
    public static void Main()
    {
        System.IO.File.WriteAllText("data.txt", "Testing...", Encoding.Unicode);

    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.