cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
When working with datatables we can indicate we want changed and added rows with:
Dim chg as DataTable = realDatatable.GetChanges(Added+Modified)
Added and Modified are integer constants in the DataRowState enum..
The code above doesnt work with Option Strict on because added+modified is an integer type result not a datarowstate type result
Currently I just cast this integer result back into a datarowstate, but i cant help feeling that its just a bit messy and awkward.. If DRS is already an integer, why does the compiler take exception to me supplying it?
Dim chg as DataTable = realDatatable.GetChanges(Added+Modified)
Added and Modified are integer constants in the DataRowState enum..
The code above doesnt work with Option Strict on because added+modified is an integer type result not a datarowstate type result
Currently I just cast this integer result back into a datarowstate, but i cant help feeling that its just a bit messy and awkward.. If DRS is already an integer, why does the compiler take exception to me supplying it?