Type t = Type.GetType("CarLibrary.SportsCar", false, true);
T Y P E R E F L E C T I O N, L AT E B I N D I N G, A N D AT T R I B U T E - B A S E D P R O G R A M M I N G
In
the previous example, notice that the string you are passing into GetType() makes
no men-
tion of the assembly containing the type. In this case, the assumption is that the type is defined
within the currently executing assembly. However, when you wish to obtain metadata for a type
within an external private assembly, the string parameter is formatted using the type’s fully quali-
fied name, followed by the friendly name of the assembly containing the type (each of which is
separated by a comma):
Do'stlaringiz bilan baham: