when I write
(int)dataTable1.Rows[0]["field1"]
I get an error that this is an invalid cast.
The value in "field1" is "20"
when I do this
int.parse(dataTable1.Rows[0]["field1"].ToString())
it works.
But why can (int)dataTable1.Rows[0]["field1"]
not be casted to an int when the value is "20".
What is the difference with int.parse ?