我想要将字符串转换为泛型类型
我有这个:
string inputValue = myTxtBox.Text;
PropertyInfo propInfo = typeof(MyClass).GetProperty(myPropertyName);
Type propType = propInfo.PropertyType;
object propValue = ?????
我想要将'inputString‘转换为该属性的类型,以检查它是否兼容。我该怎么做?
tks
https://stackoverflow.com/questions/2922855
复制相似问题