After several hours looking for a bug, I finally found it. This is the code that housed the “bug”. PropertyInfo info = obj.GetType().GetProperty("SomeProperty"); object value = info.GetValue(obj, null); if (value.GetType() == typeof(bool?)) { //Some code } else if (value.GetType() == typeof(int?)) { //Some other code } The property “SomeProperty” is a nullable type (either string, [...]
↧