Click here to Skip to main content
15,905,679 members
Home / Discussions / C#
   

C#

 
GeneralRe: unresolved hashtable problem Pin
Som Shekhar26-Apr-10 3:54
Som Shekhar26-Apr-10 3:54 
GeneralRe: unresolved hashtable problem Pin
Jassim Rahma26-Apr-10 12:35
Jassim Rahma26-Apr-10 12:35 
GeneralRe: unresolved hashtable problem Pin
Som Shekhar26-Apr-10 17:41
Som Shekhar26-Apr-10 17:41 
QuestionVariable of type Pin
jabbawok20-Apr-10 10:18
jabbawok20-Apr-10 10:18 
AnswerRe: Variable of type Pin
Anthony Mushrow20-Apr-10 10:31
professionalAnthony Mushrow20-Apr-10 10:31 
GeneralRe: Variable of type Pin
jabbawok20-Apr-10 10:37
jabbawok20-Apr-10 10:37 
AnswerRe: Variable of type Pin
Luc Pattyn20-Apr-10 10:34
sitebuilderLuc Pattyn20-Apr-10 10:34 
GeneralRe: Variable of type Pin
jabbawok20-Apr-10 10:54
jabbawok20-Apr-10 10:54 
Luc, that's exactly what I'm trying to do - a type array. Thanks!

Ok so I can create the array now. But I'm having trouble creating an instance:

Type[] TypeArray = new Type[2];
TypeArray[0] = typeof (class1);
TypeArray[1] = typeof (class2);

But the following gives typecast errors:

MyBase tmp = Activator.CreateInstance(TypeArray[0]);


How do I cast it properly?
GeneralRe: Variable of type Pin
jabbawok20-Apr-10 11:00
jabbawok20-Apr-10 11:00 
GeneralRe: Variable of type Pin
Luc Pattyn20-Apr-10 11:09
sitebuilderLuc Pattyn20-Apr-10 11:09 
GeneralRe: Variable of type Pin
jabbawok20-Apr-10 12:53
jabbawok20-Apr-10 12:53 
GeneralRe: Variable of type Pin
Luc Pattyn20-Apr-10 11:03
sitebuilderLuc Pattyn20-Apr-10 11:03 
GeneralRe: Variable of type Pin
jabbawok20-Apr-10 11:12
jabbawok20-Apr-10 11:12 
GeneralRe: Variable of type Pin
Luc Pattyn20-Apr-10 11:15
sitebuilderLuc Pattyn20-Apr-10 11:15 
GeneralRe: Variable of type Pin
jabbawok20-Apr-10 11:23
jabbawok20-Apr-10 11:23 
AnswerRe: Variable of type Pin
jabbawok20-Apr-10 12:56
jabbawok20-Apr-10 12:56 
AnswerRe: Variable of type Pin
AspDotNetDev20-Apr-10 13:04
protectorAspDotNetDev20-Apr-10 13:04 
GeneralRe: Variable of type Pin
jabbawok20-Apr-10 13:32
jabbawok20-Apr-10 13:32 
AnswerRe: Variable of type Pin
AspDotNetDev20-Apr-10 14:04
protectorAspDotNetDev20-Apr-10 14:04 
AnswerRe: Variable of type Pin
AspDotNetDev20-Apr-10 14:09
protectorAspDotNetDev20-Apr-10 14:09 
QuestionwebBrowser controll and post Pin
Ziga120-Apr-10 9:21
Ziga120-Apr-10 9:21 
AnswerRe: webBrowser controll and post Pin
Ravi Bhavnani20-Apr-10 11:11
professionalRavi Bhavnani20-Apr-10 11:11 
GeneralRe: webBrowser controll and post Pin
Ziga120-Apr-10 21:32
Ziga120-Apr-10 21:32 
GeneralRe: webBrowser controll and post Pin
Ravi Bhavnani21-Apr-10 2:15
professionalRavi Bhavnani21-Apr-10 2:15 
QuestionImage Drawing Question Pin
eddieangel20-Apr-10 8:51
eddieangel20-Apr-10 8:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.