views:

394

answers:

1

Is it possible to get a Type via Type.GetType() when the assembly-qualified name passed into GetType() specifies a different Version than the version of the DLL that's actually loaded? If so, what is the behavior of GetType()?

I want to get a Type from an assembly regardless of what version the assembly is. I have a function which gets an assembly-qualified name as an argument:

Type someType = Type.GetType(someName);

The someName value corresponds to the Type I want to get, but it may not have the same Version specified as what is loaded in my application.

+1  A: 

In testing I found that GetType() will return the proper type even if the currently-loaded assembly's version does not match the value in the assembly-qualified name's Version field.

emddudley