difference between (int) and convert.toint32 in c#
问题 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) 回答1: There are many ways to convert to an int, a lot depends on what your source is. The biggest thing to keep in mind is error checking, none of the methods are