V
Vicente Nicolau
Hello,
I wonder if there is some method that returns the fields of a class. Ideally
it should return an array of objets. For exemple, I want to get the custom
fields declared in a form:
Object[] o = this.SuperMethodThatReturnsReferencesToTheFields();
I need to do this becasue during execution time I don't know which field I
must access (and I just need to set it equal to null).
I can do it with lots of 'if', but each time I add a new field I must add a
new if. There should be a cleaner way.
I have used the MemberInfo or FieldInfo class to get the information of the
fields, but I didn't see the way to access the field itself in order to set
null.
Thanks for your ideas
Best wishes
I wonder if there is some method that returns the fields of a class. Ideally
it should return an array of objets. For exemple, I want to get the custom
fields declared in a form:
Object[] o = this.SuperMethodThatReturnsReferencesToTheFields();
I need to do this becasue during execution time I don't know which field I
must access (and I just need to set it equal to null).
I can do it with lots of 'if', but each time I add a new field I must add a
new if. There should be a cleaner way.
I have used the MemberInfo or FieldInfo class to get the information of the
fields, but I didn't see the way to access the field itself in order to set
null.
Thanks for your ideas
Best wishes