VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
当前位置:
首页 > Python基础教程 >
  • C#教程之C#数据类型 值传递和引用传递(2)

  

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
static void Main(string[] args)
        {
            //ToolA toolA=new ToolA();
            //toolA.Func("张靓颖");
 
 
 
            //ToolB b=new ToolB();
            //string result=b.Func("微冷的雨训练营");
            //Console.WriteLine(result);
 
 
            ToolC c=new ToolC();
            Computer[] comps=new Computer[3];
            comps[0]=new Computer();
            comps[0].Type = "苹果";
 
            comps[1] = new Computer();
            comps[1].Type = "联想";
 
            comps[2] = new Computer();
            comps[2].Type = "惠普";
 
            Computer[] compsnew = c.Func(comps);
 
            foreach (Computer computer in compsnew)
            {
                Console.WriteLine(computer.Type);
            }
            Console.ReadKey();

相关教程