Has anyone here written a custom object browser?

  • Thread starter Thread starter Jeff Johnson [MVP: VB]
  • Start date Start date
Jeff Johnson said:
If so, how did you distinguish between classes and (VB) modules?

VBC.EXE translates modules into classes.

So basically,

module test
public sub foo()
end sub
end module

becomes


<Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute()> _
class test
public shared sub foo()
end sub
end class


So the answer is: Look for a
Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute().

David
 
Hi, Jeff

you might need to look up CLR standards - this information is part of
manifest. Also, Reflection classes and methods can help you find what is
what.

In short module is container for classes. There is special table in manifest
which describes referenced modules. Separate tables describe classes.

For example Assembly.GetModules get list of modules referenced by assembly.
Assembly.GetTypes gets list of defined types including classes.

See Reflection overview and I would suggest to start from there

HTH
Alex
 
And sorry, of course there are such:
you can look up Anakrino or Reflector of Lutz Roeder in google. Excellent
examples

HTH
Alex
 
Back
Top