How to convert long to int in .net?

后端 未结 7 2461
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-18 15:19

I am developing window phone 7 application in silverlight. I am new to the window phone 7 application. I have the long value in String format as follows

String A         


        
7条回答
  •  借酒劲吻你
    2021-02-18 16:15

    Use Convert.ToInt32(). If the value is too big for an int then it will throw an OverflowException.

    This method can take a whole range of values, including Int64 and Strings.

提交回复
热议问题