Is it possible to load a class and create Instance of it from It's .cs file?
.cs
I want to open a custom class in a .cs file and create instance of it in my application
thanks
in theory yes - it mainly depends on whether you have all dependencies available...
IF so you can use the built-in CSharpCodeProvider to compile the .cs- file to an assembly (can be purely in-memory if need be) and then use Reflection to create an instance/use a class from that assembly...
CSharpCodeProvider
Since don't provide much detail I would suggest to checkout these links and come back with detail questions if some arrise:
1.4m articles
1.4m replys
5 comments
57.0k users