小弟问几道C#题

来源:百度知道 编辑:UC知道 时间:2024/06/06 05:09:59
1.编写一个应用程序,该程序使用两个命令行参数,分别把脂肪在一个字符串和一个整型变量中,然后显示这些值
2.创建一个委托,再请求用户输入时,使用它模拟Console.ReadLine()函数。(这件我见过,但是还是不明白,请详细讲一下 谢谢)
3.修改下面的结构,使之包含一个返回订单总价各的函数(这题我想是用return语句吗 加在最后面 ? 请讲一下)
4.在order结构中添加另一个函数,该结构返回一个格式化的字符串,以合适的值代替换用尖括号起来的条目
Ord Information:<unit count><item name>items at $<unit cost>each,total cost$<total cost>
快学到调试和处理这了,好多题都不明白。不知道怎么回事。迷茫了
我看的就是C#入门经典里的 越看越糊涂 我晕了 打错了 不是脂肪 是把值放在.....
第三题的struct order
{
public string itemName;
public int unitCount;
public double unitCost;这题是不是用return 语句 加再最后面

这样做,记得给我加分哦。。。。
1题:
static void Main(String[] args)
{
string zhiFang = args[0]; //字符串
int zhiFang = Convert.ToInt32(args[1]); //第二个输入数字
}
2题:
不想写
3题:
下面的结构,在哪?
4题:
//高效作法2
string s1="select {0} from {1}";
string s1help=string.Format(s1,args[0],args[1]);
Console.WriteLine(s1help);

C#入门经典里都有这些例子