Torna al Thread

FileStream fs = new FileStream(@"c:\test.prg", FileMode.Create, FileAccess.Write, FileShare.None); UInt16 ui1 = 1; char ch1 = Convert.ToChar(ui1); UInt16 ui2 = 220; char ch2 = Convert.ToChar(ui2); UnicodeEncoding enc = new UnicodeEncoding(true, false); char[] c = new char[2]; c[0] = ch1; c[1] = ch2; using (StreamWriter sw = new StreamWriter(fs)) { sw.Write(enc.GetBytes(c)); sw.Write(c); }
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5