是否可以从类型的构造函数中从类型成员获取Name? 例如:
包含成员属性的类
public class ClassA
{
public int X {get; set; }
public GenericType<ClassA> iNeedThisName {get; set;}
}
GenericType的类定义,我希望从该类访问构造函数中的值
public class GenericType<T>
{
private _iNeedThisNameValue = null;
public GenericType()
{
_iNeedThisNameValue = this.Get"IneedThisName()".ExtensionMethod();
}
public string idLikeToDefault { get; set;} = _iNeedThisNameValue;
}