using System; using System.IO; int main() { try { using (StreamWriter w = File.CreateText("hello.txt")) { w.WriteLine("Hello, 世界!"); } } catch (Exception ex) { Console.Error.WriteLine(ex.Message); return 1; } return 0; }