Top "System.type" questions

Create an instance of a class from a string

Is there a way to create an instance of a class based on the fact I know the name of …

c# .net instantiation system.type
Is there a better alternative than this to 'switch on type'?

Seeing as C# can't switch on a Type (which I gather wasn't added as a special case because is relationships …

c# switch-statement system.type
How return the type of a System.__COMObject in System.Type in C#

I'm doing a program and I want to do a Reflection, but for this, I need an Object of the …

c# reflection gettype comobject system.type
cannot implicitly convert System.Type to object

I am trying to make the generic method for loading the form settings in .NET C# where each setting would …

c# object casting system.type
Best way to check if System.Type is a descendant of a given class

Consider the following code: public class A { } public class B : A { } public class C : B { } class D { public static bool …

c# .net reflection type-systems system.type
Protobuf-Net error message: No Serializer defined for type: System.Type

I am getting the following error message when trying to serialize List<Tuple<string, Type, object>>: …

c# protocol-buffers protobuf-net system.type
Difference between IsGenericType and IsGenericTypeDefinition

What is the difference between Type.IsGenericType and Type.IsGenericTypeDefinition ? Interestingly enough, MSDN's link for IsGenericTypeDefinition is broken. After playing …

c# generics reflection system.type