Open hybridherbst opened 6 years ago
It works, but you have to know the correct field/property. For most basic types this is "m_value", at least on .NET 4.5
FieldInfo field = typeof(int).GetField("m_value", BindingFlags.Public | BindingFlags.Instance);
int a = 5;
int result = (int) field.GetValue(a);
Why is it not possible to set the Value contained in a wrapper? For structs, it works fine using the Get/Set methods, but for base value types (such as float, int, ...) this doesn't work, as they don't have a "setter" method or something.
Or am I missing something?