Cannot implicitly convert 'string' to 'System.TypeCode'
问题 Just wondering if anyone knows how to fix this error? I've also used TypeCode. but still no luck. Thanks case typeof(Nullable<int>).ToString(): //<----- error is here if ((!object.ReferenceEquals(value, DBNull.Value))) { return value; } else { return null; } This is the switch public static object HandleDBNull(object value, System.Type _type) { switch (Type.GetTypeCode(_type)) { Thanks again for any help 回答1: Ultimately, typeof(Nullable<int>) isn't a TypeCode , and the string representation