题目:编写一个应用程序,该程序使用两个命令行参数,分别把值放在一个字符串和一个整数变量中,然后显示这些值。
代码:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace Test { class Program { static void Main(string[] args) { int integer; string str; str=args[1]; integer=Convert.ToInt32(args[0]); Console.WriteLine("字符串:{0};整型:{1}",str,integer); Console.ReadKey(); } } }