Hi,
I want to add one element to an Array dynamicly, according to the type
of the parameter ALLDATA.
ALLDATA may be of type PObjects, PActions, PMaterials.
I Thougth about my code to look something like this:
public void GetAllData (Object[] AllData) {
Type dataType = AllData.GetType();
AllData[curData] = new dataType();
}
But the compiler says :
error CS0246: The type or namespace name 'dataType' could not be
found.
One more problem is, that AllData.GetType returns PObjects[] etc. when
I need PObjects.
Can someone help me please.
Thank you very much.
Frank
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com