I wonder if myClass.GetType().Assembly returns the assembly instance from
which the object was created ( via Assembly.CreateInstance() ), or if it
returns a new instance of the assembly associated with the object's type.
In other words, if two class instances were created respectively from two
instances of the same assembly, then does
myClass1.GetType().Assembly == myClass2.GetType().Assembly
return true or false ?
"Bruce Wood" <br*******@canada.comwrote in message
news:11**********************@n15g2000prd.googlegr oups.com...
On Jun 19, 4:58 pm, "John Grandy" <johnagrandy-at-gmail-dot-com>
wrote:
>It does not seem possible to compare instances of assemblies from which
instances of controls/classes are created.
In other words, if I have
Assembly myAssembly Assembly.LoadFrom(path);
object myClass = myAssembly.CreateInstance("<ClassName>");
It is not possible to obtain a reference to myAssembly from myClass ...
How about
Assembly a = myClass.GetType().Assembly;
?