日期:2014-05-18 浏览次数:21183 次
using System;
public class Test1
{
public static void Main()
{
int num = 0;
Person p = new Person("Li");
A1(p, num);
Console.WriteLine("{0},{1}", p.name, num);
}
static void A1(Person p, int num)
{
p = new Person("Wang");
num = 1;
}
}
public class Person
{
public string name;
public Person(string name)
{
this.name = name;
}
}
using System;
public class Test1
{
public static void Main()
{
int num = 0;
Person p = new Person("Li");
A1(p, num);
Console.WriteLine("{0},{1}", p.name, num);
}
static void A1(Person p, int num)
{
p.name = "Wang";
num = 1;
}
}
public class Person
{
public string name;
public Person(string name)
{
this.name = name;
}
}
------解决方案--------------------
学习+接分
------解决方案--------------------
好多人学习都不注重基础的,都是拿来就用,不知就里
------解决方案--------------------
jf来的
------解决方案--------------------
亡灵
------解决方案--------------------
up
------解决方案--------------------
悄悄的路过
顺便bs一下c#
既然学java,就干脆学到底,偏偏关键字改个大小写,这不是吃饱了撑的嘛。。。。。。。。
Main:main
string:String
------解决方案--------------------