1

I did a little reflection code.

var objValue = objType.GetProperty(propertyName)!.GetValue(obj, null);
if (objValue == default) // doesn't work for structures
    continue;

But the equal operator doesn't work for structures. How to fix it?

0 Answers0