值变量作用
class C{
public int Value = 0;
}
class Program
{
static void Main(string[] args)
{
int V1 = 0;
int V2 = V1;
V2 = 927;
C r1 = new C();
C r2 = r1; //请问一下这段代码是否让r2继承了C类的r1对象呢???
r2.Value = 112;
Console.WriteLine("Values:{0},{1}",V1,V2);
Console.WriteLine("refs:{0},{1}",r1.Value,r2.Value);
Console.ReadLine();
}