Please tell me why
-
object obj = Activator.CreateInstance(type); arraylist.Add(obj); generates the following compile error: Value null was found where an instance of an object was required. Yet this code works fine so its obvious that obj is not null...isnt it ? object obj = Activator.CreateInstance(type); IInterface i = (IInterface)obj; i.InvokeAMethod();
-
object obj = Activator.CreateInstance(type); arraylist.Add(obj); generates the following compile error: Value null was found where an instance of an object was required. Yet this code works fine so its obvious that obj is not null...isnt it ? object obj = Activator.CreateInstance(type); IInterface i = (IInterface)obj; i.InvokeAMethod();
have you done
arraylist = new System.Collections.ArrayList;
? wouldn't be the first time I've forgotten to do that :) James Sonork ID: 100.11138 - Hasaki "Not be to confused with 'The VD Project'. Which would be a very bad pr0n flick. :-D" - Michael P Butler Jan. 18, 2002 -
have you done
arraylist = new System.Collections.ArrayList;
? wouldn't be the first time I've forgotten to do that :) James Sonork ID: 100.11138 - Hasaki "Not be to confused with 'The VD Project'. Which would be a very bad pr0n flick. :-D" - Michael P Butler Jan. 18, 2002