createinstance Questions

1

Hi have a vb6 project "PROJVB6" with a class "CLASSVB6" with this content: ... Public Type ActualParametersType_DOCUMENTI Codice As Variant Numreg As Variant End Type ... Private Gvar_ActualPar...
Thoroughbred asked 12/10, 2016 at 8:8

5

Solved

I want to create an instance of a type that I specify in a generic method that I have. This type has a number of overloaded constructors. I'd like to be able to pass arguments to the constructors, ...
Giulia asked 16/3, 2010 at 0:7

6

I'm trying to improve the performance of our application. We have a lot of Activator.CreateInstance calls that are causing some grief. We instantiate a lot of classes based on an interface (ITabDoc...
Alnico asked 5/7, 2011 at 11:56

1

Solved

I'm creating an instance of an object using reflection and getting the methods within the class of the object, but then the problem comes when I have to use an array of type Type to avoid ambiguity...
Teheran asked 17/7, 2015 at 21:50

2

Solved

I have created an engine that takes in 3rd party plugins (DLL's) that implement an interface. Since I have no control over the code that gets plugged in, I want to be able to run 1 specific method...
Revolutionist asked 3/1, 2013 at 9:41

2

I have a base class, which is as follows: public Data() { id = num++; SetVariables(); } //fill every Variable varNames, parseInduction, noise, seperator in Children Classes public Data(Strin...
Dandy asked 24/8, 2012 at 16:20

2

Solved

This can create an array dynamically: Assembly asm = object.GetType().Assembly; string sTypeName = "Company.Namespace.ClassName"; object arrayWithSize1 = Activator.CreateInstance( asm.GetType(sTyp...
Ion asked 26/1, 2012 at 17:1

2

Solved

is it possible to create and show TForm without having source files for it ? I want to create my forms at runtime and having the empty *.dfm and *.pas files seems to me useless. Thank you
Surgy asked 21/12, 2011 at 19:43

2

Solved

I am trying to create an object via an API, i.e. no forms are required, should I be doing MyModel.new(:name => params[:name]) or MyModel.create(:name => params[:name]) ? Assume I have resour...
Shoeblack asked 27/11, 2011 at 13:35

8

Solved

I need a performance enhanced Activator.CreateInstance() and came across this article by Miron Abramson that uses a factory to create the instance in IL and then cache it. (I've included code below...
Atwell asked 7/1, 2010 at 23:20

5

Solved

What I have now (which successfully loads the plug-in) is this: Assembly myDLL = Assembly.LoadFrom("my.dll"); IMyClass myPluginObject = myDLL.CreateInstance("MyCorp.IMyClass") as IMyClass; This ...
Indaba asked 25/9, 2008 at 16:50

2

Solved

My scenario is that I have a .net application (let's say a Console App) that creates AppDomains. It then needs to create instances and call methods on Types that are in that AppDomain. Each AppDoma...
Steading asked 16/1, 2010 at 0:50
1

© 2022 - 2024 — McMap. All rights reserved.