How to convert long to int in .net?

后端 未结 7 2458
爱一瞬间的悲伤
爱一瞬间的悲伤 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:00

    A Long value stores more data than an Integer 32 value, so if you want to keep all 15 digits you can't convert to a standard Integer.

    But aside from 'which' datatype you want to use, the Convert class should help you i.e. Convert.ToInt64 which may do what you want

提交回复
热议问题