1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | //Copyright (C) Microsoft Corporation. All rights reserved. // Hello3.cs // arguments: A B C D using System; public class Hello3 { public static void Main( string [] args) { Console.WriteLine( "Hello, World!" ); Console.WriteLine( "You entered the following {0} command line arguments:" , args.Length ); for ( int i=0; i < args.Length; i++) { Console.WriteLine( "{0}" , args[i]); } } } |
C#(CSharp)範例教學:
http://msdn.microsoft.com/zh-tw/library/9ys06tc9(v=vs.90)
範例下載:
http://code.msdn.microsoft.com/csharpsamples
後記:
這是Microsoft Developer Network(MSDN)上的中文教學。
沒有留言:
張貼留言