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 关注
- 679 浏览
添加回答
举报
0/150
提交
取消