I am not interested in ALL the types in the referenced assembly. I only
want
the types that I referenced. For example:
Assembly A:
object x = new Thing1();
Assembly B:
class Thing1() { ... }
class Thing2() { ... }
class Thing999() { ... }
I need something like this:
Assembly x = (reference to Assembly A);
Type[] refTypes = x.GetReferencedTypes();
refTypes should contain only Thing1; not Thing2, Thing999, etc.
Sorry I wasn't more explicity in my original posting.
Vadym Stetsyak said:
You can get the types that are in the referenced assembly.
To find what types are referenced you have to operate on the level of
source
code ( parse source code, get type declarations and search the
assessmblies
they are stored in )
Another way is using reflection to iterate through class and get info
about
params and return types etc. However you'll miss methods body, where the
type can be used.