difference between (int) and convert.toint32 in c#
- by 4thpage Media and services
when i convert a object to int by
(int)object
then when the object value is 0 then he give me error that specific cast not valid.
when i convert a object to int by
convert.toint32(object)
then he works and give me 0 means cast is valid.
and i want to know that what is difference between both.
1. (int)object
2.convert.toint32(object)