从访问器返回新实例是否存在问题?如果是这样,有没有更好的方法?
public class Person
{
private RecIpDet _ipDet;
public RecIpDet IpDet
{
get
{
if(_ipDet == null)
_ipDet = new RecIpDet();
return _ipDet;
}
}
}