コード例 #1
0
ファイル: byvalue42.cs プロジェクト: cartermp/core-docs
 public static void Main()
 {
     var rt = new SampleRefType();
     rt.value = 44;
     ModifyObject(rt);
     Console.WriteLine(rt.value);
 }
コード例 #2
0
    //<Snippet75>
    public static void TestRefType()
    {
        SampleRefType rt = new SampleRefType();

        rt.value = 44;
        ModifyObject(rt);
        Console.WriteLine(rt.value);
    }
コード例 #3
0
 static void ModifyObject(SampleRefType obj)
 {
     obj.value = 33;
 }
コード例 #4
0
ファイル: byvalue42.cs プロジェクト: cartermp/core-docs
 static void ModifyObject(SampleRefType obj)
 {
     obj.value = 33;
 }