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
two ethernet to one motherboard, each ethernet is connected with a different isp. combination is needed
MYSQL custom Sorting
Server 2008/Exchange 2010 Scheduled Task: Exchange Shell Script Not working
huge image file- how to handle it
wordpress editing home page and links
Can an iPad connect to a Windows Server VPN?
self.close
truncating table and updating from another table converting varchar to int and datetime
unable to send mail
default printing on TS, server 2008 x64, xpsp3 w/rdp7