Bjoern,
Assuming you have the full name of the assembly, you can do this:
// Load the assembly.
// You might need a different overload or method on Assembly to load the
assembly.
Assembly assembly = Assembly.Load(assemblyName);
// Get the type from the assembly.
Type type = assembly.GetType(typeName);
// Create an instance. You might need to call an overload that takes
parameters.
assembly.CreateInstance(type);
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Bjoern" <bj***********@web.de> wrote in message
news:10*********************@z14g2000cwz.googlegro ups.com...
I have a name of a class and the corresponding assembly.
Now I want to create an object of this class.
I think it is should work with Reflection. But I don't
know how exactly.
Could someone post a little sample in C# code.
Thanks in advance,
Bjoern