Thank you,
Perhaps i should have been more explicit in my question.
I already use reflection, and it works half-way: Without
ReflectionPermission you cannot access the non-public members of a class (
that's why I wrote I had that permission out of the way)
Now, WITH ReflectionPermission, I can access ALL members, but ONLY on the
current class level. But I CANNOT obtain the PRIVATE members of the base
classes. (That is normal, because private members of a base class are NOT
members of the derived classes) - PROTECTED members are available, even if
they are declared on base classes -
I would like to know if there is a way around this.
Thank you
Nicholas Paldino said:
Abelardo,
You will only be able to access this information through reflection,
getting the MethodInfo instances representing the private methods, and
then
calling Invoke on them (using the instance of the object).
If you have access to the code of the class, you might want to
consider
exposing the methods as public/internal/protected (depending on where the
method calls are taking place).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
message
Hi,
The title sums up the question pretty much.
I would like to access all private members of a class including the
private
members of its base classes.( I already have the ReflectionPermission )
Is there a way to get this information ?
Thnaks in advance