Lets say I have a struct with more than hundred elements with complex names. And I am passing a struct of the struct type described to a function using ref, like this:
You can do this in .NET BUT as several others have already posted: DO NOT DO IT.
Some Code
a.GetType().GetProperties() [0].SetValue (a, newvalue, null);
EDIT: several reasons not to do this:
the order is not guaranteed !
what happens when there are no properties ?
what happens with readonly properties ?
So again: DO NOT DO THIS!