我在我的领域类的小数值属性更改属性类型方法比较这两个属性:使用反射
public void Compare(List<object> Domains)
{
//get properties with reflection
//if the properties values are different i need to set a 'string' value [DIFFERENT] to it.
prop.SetValue(comparableObj, "[DIFFERENT]", null);
}
有没有可能做?
这正是一种类型安全的语言的对面看着方法。你不能那样做。 – SLaks