110,533
社区成员
发帖
与我相关
我的任务
分享
class Child
{
private int age;
private string name;
private Mydll test;
public void PrintChild()
{
Console.WriteLine("hello");
}
}
private Mydll test;
private Mydll test;
就可以正常执行private Mydll test;
就会报错。private Mydll test;
这句,万一用户加载了呢。private bool? _garbageFlag;
public bool GarbageInUse
{
get
{
if(!_garbageFlag.HasValue)
try
{
var x = test;
_garbageFlag = true;
}
catch
{
_garbageFlag = false;
}
return _garbageFlag.Value;
}
}