c# - How do I get the type with a type string when the version has changed? -
i saving list of type strings instantiated dynamically. using reflection, how type type string when version number has changed?
example, have type string defined as:
acmecorporation.businessobjects.customer, acmecorporation.businessobjects, version=2.0.0.0, culture=neutral, publickeytoken=dccbd7ce7d6a58c0
//this works fine type type = type.gettype(typestring, false);
however when assembly version changes 2.0.0.1
saved type string not work because version numbers diferent.
can find assembly name , find type name?
how this?
if don't care version, why include in type string? parts except first 1 optional in string passed type.gettype
:
type t = type.gettype("acmecorporation.businessobjects.customer, acmecorporation.businessobjects");
Comments
Post a Comment