Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# how to load type of class from string

Assembly asm = Assembly.LoadFrom("file path to your assembly");

Type typ = asm.GetType("MyOrg.MyApp.Services.Example, MyOrg.MyApp.Services");

object instance =  Activator.CreateInstance(typ);
 
PREVIOUS NEXT
Tagged: #load #type #class #string
ADD COMMENT
Topic
Name
6+1 =