From: Tony Johansson on 14 May 2010 05:41 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
From: Patrice on 14 May 2010 05:53 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... -- Patrice
|
Pages: 1 Prev: Create an Ax file in a dll? Next: what's the equivalent of ThreadLocal of Java for C# ? |