谁能帮我解释一下ref的含义?
问题描述:
谁能帮我解释一下ref的含义?
答
reference,引用下列代码的运行结果?using System;namespace _08001{class Audi{ static void Main() {AAA a1 = new AAA();Do(a1);Console.WriteLine(a1.nA); } static void Do(AAA a2) {a2.nA = 7; }}class AAA{ public int nA; public AAA() {nA = 9; }}} 结果是好多?能不能给我一个详细的解释?