Top "Instantiation" questions

Instantiation is the process of creating objects from a class in most object oriented and object based languages.

Creating instance of type without default constructor in C# using reflection

Take the following class as an example: class Sometype { int someValue; public Sometype(int someValue) { this.someValue = someValue; } } I then …

c# reflection instantiation default-constructor
Is there a way to instantiate objects from a string holding their class name?

I have a file: Base.h class Base; class DerivedA : public Base; class DerivedB : public Base; /*etc...*/ and another file: …

c++ inheritance factory instantiation
base() and this() constructors best practices

Under what conditions am I supposed to make the :base() and :this() constructor calls following my constructor's parentheses (or even …

c# oop inheritance constructor instantiation
How to Properly Declare Array of Custom Objects in Swift?

Here is my custom class...not sure if I'm missing anything in it... import UIKit class baseMakeUp { var Image = UIImage() …

ios arrays class swift instantiation
Why is [] faster than list()?

I recently compared the processing speeds of [] and list() and was surprised to discover that [] runs more than three times …

python performance list instantiation literals
Can I use methods of a class without instantiating this class?

I have a class with several methods and there is no constructor among these methods. So, I am wondering if …

java oop class methods instantiation
Why is Class.newInstance() "evil"?

Ryan Delucchi asked here in comment #3 to Tom Hawtin's answer: why is Class.newInstance() "evil"? this in response to the …

java constructor runtime instantiation
How does one instantiate an array of maps in Java?

I can declare an array of maps using generics to specify the map type: private Map<String, Integer>[] …

java arrays generics map instantiation
Call a model method in a Controller

I'm have some difficulties here, I am unable to successfully call a method which belongs to a ProjectPage model in …

ruby-on-rails methods model controller instantiation
instantiate chrome object in powershell

I have a powershell script which works just fine in IE however I need to also have it work in …

google-chrome powershell instantiation