reflection (?) question

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

If you rename a type at design time, the the task list shows what code broke,
which happens to be a very nice list of dependant classes and methods. Is there
any way to produce such dependency information at runtime?

Bob
 
Hi Bob,

What do you mean by dependant?

Do you mean classes that inherit your class, or variables that are declared
as your class type, or both, or something else?

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
 
The dependency information I'm looking for is more general than inheritance or
declaration, it is simply reference: would a compile error be generated from
within a particular type (class or otherwise) at design time if another type
were renamed or removed? I was hoping it would be possible to find the answer to
such a question at runtime.

Bob
 
Hi Bob, The IDE will handle this internally, it'll have some mapping
information stored in memory, i.e. won't use reflection but some other
elaborate method.

Using reflection would be *very* tedious and long because you'd have to scan
*every* type in the assembly. Things you would need to look for are
parameters, fields, properties, locals, etc...

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
 
* "Bob said:
If you rename a type at design time, the the task list shows what code broke,
which happens to be a very nice list of dependant classes and methods. Is there
any way to produce such dependency information at runtime?

Have a look at the 'Type' class. This class provides information on the
implemented interfaces and super-class.
 
Back
Top