C#语言参考(微软)

[入库:2005年11月10日] [更新:2008年8月18日]

本文简介:本文档为C#语言程序设计参考(微软),相信本书在C#的程序设计中能为您提供有用的参考与帮助.

using System;
class Class1
{
  public int Value = 0;
}
class Test
{
  static void Main() {
  int val1 = 0;
  int val2 = val1;
  val2 = 123;
    Class1 ref1 = new Class1();
    Class1 ref2 = ref1;
  ref2.Value = 123;
    Console.WriteLine("Values: {0}, {1}", val1, val2);
    Console.WriteLine("Refs: {0}, {1}", ref1.Value, ref2.Value);
 }
}
                    
Values: 0, 123
Refs: 123, 123
 val1 val2int
ref.Value  
ue=123 ref1 ref2
  
Console.WriteLine("Values: {0}, {1}", val1, val2);
Console.WriteLine("Refs: {0}, {1}", ref1.Value, ref2.Value);

本方案相关附件

本文关键:,C#,程序设计,编程,参考,微软,
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top