Top "Activator" questions

Activator is a .NET class that can create dynamically-typed object instances at runtime.

Set property Nullable<> by reflection

I try to set a Nullable<> property dynamicly. I Get my property ex : PropertyInfo property = class.GetProperty("PropertyName"); // …

c# generics reflection nullable activator
Does System.Activator.CreateInstance(T) have performance issues big enough to discourage us from using it casually?

Does System.Activator.CreateInstance(T) method have performance issues (since I'm suspecting it uses reflection) big enough to discourage us …

.net performance instantiation activator
How to fix Activator.CreateInstance failing with MissingMethodException "Constructor on type not found"?

I'm trying to create a custom User Control with the following: var panel = new GenericAccordionPanel<ZoneReport, ZonesPanel, ZonesVM>(…

c# wpf activator createinstance
cast with a Type variable

The below code won't work, I wanted to know how I can dynamically cast an instance to a type determined …

c# casting activator
How to access Microsoft Word existing instance using late binding

i am developing some code in c# where i will be interacting with Microsoft Word. I want to be able …

c# automation ms-word late-binding activator
Type.GetType(string typeName) returns null

My code is type = Type.GetType(key); Key which i pass is a namespace qualified name . My code is in …

c# class reflection activator gettype
Dynamically create an array and set the elements

This can create an array dynamically: Assembly asm = object.GetType().Assembly; string sTypeName = "Company.Namespace.ClassName"; object arrayWithSize1 = Activator.CreateInstance( …

c# arrays reflection activator createinstance
Activator and static classes

I'm tossing around the idea of using the Activator class in order to get access to resources in an assembly …

c# reflection static activator
Activator.CreateInstance: Dynamic Instantiation of Classes

I am designing a loosely-coupled structure. I want to call classes from different assemblies/namespaces via a code which is …

c# factory-pattern activator