field<t> invalid cast
- by Zwempha
I'm having problems when using linq on a datatable.asenumerable().
This throws InvalidCastException.
DateTime date=r.Field<DateTime>("date");
This works fine.
DateTime date = DateTime.Parse(r.Field<string>("date"));
What am I missing?
Regards Sven