C # Assembly
Assembly is a collection of information such as the program name, version number, self-description, file association, and file location.
You can use Assembly information to obtain information required for programming, such as program classes and instances.
Create NamespaceRef.
Using System; using System. collections. generic; using System. text; using System. reflection; namespace NamespaceRef {class Program {static void Main (string [] args) {Country cy; String assemblyName = @ NamespaceRef; string strongClassName = @ NamespaceRef. chinese; // note: the class name must be a strong class name. // assemblyName can be used through AssemblyInfo of the project. cy = (Country) Assembly found in cs. load (assemblyName ). createInstance (strongClassName); Console. writeLine (cy. name); Console. readKey () ;}} class Country {public string name;} class Chinese: Country {public Chinese () {name = Hello ;}} class America: Country {public America () {name = Hello ;}}}You can create a specified object by name. This provides convenience for the design mode.