Microsoft
Software
Hardware
Network
Question : Instanciate a "Type"
Hi!
I want to know if it is possible to create an instance of class from a type.
Example:
public void (Type type){
//Dictionnary is a Dictionary<Type, Interface that all "type" we receive implements
Dictionnary[type] = createNewInstanceType();
}
I'm not sure I will really use that but I need to know if it is possible
Answer : Instanciate a "Type"
System.Type ThisType = System.Type.GetType("MySpe
cialType",
true);
Result = (MySpecialType)System.Acti
vator.Crea
teInstance
(ThisType)
;
Random Solutions
Microsoft Access database on network omits objects when accessed from a specific computer
C# - Problem in closing application form
How do I programmatically expand a Drupal 6 navigation menu entry?
xirr in coldfusion
Tutorial needed on passing a value from a sub-report to the report header?
Understanding encryption algorithms
Joining Tables from Separate DB Connections in an SQL Query
Select Statement Change
companyweb site not found
Associate compress folder to another file type