MemberInfo derived classes

T

Tony Johansson

Hi!

In the book Microsoft Press 70-536 it says that the following classes derive
from MemberInfo class
I have checked this and noticed that LocalVariableInfo do not inherit from
MemberInfo. Actually it only derives from the root class object. here is a
copy from MSDN.
[ComVisibleAttribute(true)]
public class LocalVariableInfo

So in this case the book must have missed this but why do not
LocalVariableInfo derive from MemberInfo ?

1. ConstructorInfo
2. EventInfo
3. FieldInfo
4. LocalVariableInfo
5. MethodBase
6. MethodInfo
7. PropertyInfo
8. Type

//Tony
 
P

Patrice

Hello,
So in this case the book must have missed this but why do not
LocalVariableInfo derive from MemberInfo ?

IMO because MemberInfo is the base class for those metadata that are exposed
and used by other assemblies. Local variables are never used by external
code and are not exposed as part of "usual" metadata...

This is just a guess as only those who wrote .NET could tell precisely why a
particular design decision were done...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top