By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,572 Members | 1,603 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,572 IT Pros & Developers. It's quick & easy.

reflection (?) question

P: n/a
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

Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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
"Bob" <no*****@nospam.net> wrote in message
news:us**************@TK2MSFTNGP09.phx.gbl...
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

Nov 20 '05 #2

P: n/a
Bob
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

"Tom Spink" <th**********@ntlworld.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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
"Bob" <no*****@nospam.net> wrote in message
news:us**************@TK2MSFTNGP09.phx.gbl...
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



Nov 20 '05 #3

P: n/a
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" <no*****@nospam.net> wrote in message
news:uB**************@tk2msftngp13.phx.gbl...
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

"Tom Spink" <th**********@ntlworld.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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
"Bob" <no*****@nospam.net> wrote in message
news:us**************@TK2MSFTNGP09.phx.gbl...
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


Nov 20 '05 #4

P: n/a
* "Bob" <no*****@nospam.net> scripsit:
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.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.