class aaa
{private int x;
public int xx
{set
{x=value;
}
get
{return x;
}
}
}
其中value是set 隐葳的参数
这么写是正确的.
但是下面的没有编译时的错误,运行时stack overflow.
class aaa
{
public int xx
{set
{xx=value;
}
get
{return xx;
}
}
}
{private int x;
public int xx
{set
{x=value;
}
get
{return x;
}
}
}
其中value是set 隐葳的参数
这么写是正确的.
但是下面的没有编译时的错误,运行时stack overflow.
class aaa
{
public int xx
{set
{xx=value;
}
get
{return xx;
}
}
}