B
Brian P
I am getting an invalid cast exception when I try
to take an ArrayList with datetime values and use
the ToArray method to create an object array.
I need to use an object array becase I'm working
with various datatypes and need the code to
be as generic as possible.
Most of to code involves dynamically determining
the datatype, which all works.
The code that fails is where I already know the
type is date time:
object[] objArray = (object[]) list.ToArray(typeof(DateTime));
How can I get an array of date time objects into an object array??
Thanks for any help,
Brian
to take an ArrayList with datetime values and use
the ToArray method to create an object array.
I need to use an object array becase I'm working
with various datatypes and need the code to
be as generic as possible.
Most of to code involves dynamically determining
the datatype, which all works.
The code that fails is where I already know the
type is date time:
object[] objArray = (object[]) list.ToArray(typeof(DateTime));
How can I get an array of date time objects into an object array??
Thanks for any help,
Brian