1 回答

小唯快跑啊
TA貢獻1863條經驗 獲得超2個贊
Java寫法:
1234 | public static void main(String[] args) throws Exception { System.setOut( new PrintStream( new File( "test.ini" ))); System.out.println( "Merry Christmas!!!" ); } |
C#寫法:
123456789101112 | static void Main(String[] args){ try { TextWriter @ out = new StreamWriter( "test.ini" ); Console.SetOut(@ out ); Console.Write( "Merry Christmas!!!" ); @ out .Close(); } catch (Exception ioerr){ throw ioerr; } Console.ReadKey( true ); } |
- 1 回答
- 0 關注
- 709 瀏覽
添加回答
舉報
0/150
提交
取消