protected void Page_Load(object sender, EventArgs e)
{
int value = 0;//初始值
Test(ref value);
Response.Write(value.ToString());//值被改变,结果是9999
Response.End();
}
protected void Test(ref int value)
{
value = 999;
}
protected void Page_Load(object sender, EventArgs e)
{
int value = 0;//初始值
Test(ref value);
Response.Write(value.ToString());//值被改变,结果是9999
Response.End();
}
protected void Test(ref int value)
{
value = 999;
}