I have some problem. I want to creating instance of class by name.
I found Activator.CreateInstance
http://msdn.microsoft.com/en-us/library/d133hta4.aspx and it
If you had System.TypeLoad Exception, your class name is wrong.
To method Type.GetType you must enter assembly-qualified name. That is with the project name For example: GenerateClassDynamically_ConsoleApp1.Foo
If it is in another assembly jou must enter assembly name after comma (details on https://stackoverflow.com/a/3512351/1540350): Type.GetType("GenerateClassDynamically_ConsoleApp1.Foo,GenerateClassDynamically_ConsoleApp1");