Top "Createinstance" questions

How to Pass Parameters to Activator.CreateInstance<T>()

I want to create an instance of a type that I specify in a generic method that I have. This …

c# generics createinstance
Fast creation of objects instead of Activator.CreateInstance(type)

I'm trying to improve the performance of our application. We have a lot of Activator.CreateInstance calls that are causing …

c# reflection reflection.emit activator createinstance
How to pass ctor args in Activator.CreateInstance or use IL?

I need a performance enhanced Activator.CreateInstance() and came across this article by Miron Abramson that uses a factory to …

.net performance parameters il createinstance
ruby on rails, creating new object, use create or new method?

I am trying to create an object via an API, i.e. no forms are required, should I be doing …

ruby-on-rails ruby api new-operator createinstance
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
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
How To Use ObjectFactory Generated By Jaxb?

I am using Jaxb to generate Java classes. My schema has the following element defined: <xs:complexType name="AutomobileType" …

jaxb createinstance objectfactory
CreateInstance of a Type in another AppDomain

My scenario is that I have a .net application (let's say a Console App) that creates AppDomains. It then needs …

c# appdomain createinstance
Activator.CreateInstance vs Factory Pattern

What is the difference between Activator.CreateInstance and factory? Can they be used interchangeably? Or stil do we need a …

c# design-patterns factory createinstance