开发者

How to convert SPFieldNumber into an int

开发者 https://www.devze.com 2022-12-26 23:53 出处:网络
How do I convert an SPFieldNumber into an int in C#?I tried to use Convert.ToInt32 but it doesn\'t seem to be work开发者_如何学编程ing.You should be able to do something like:

How do I convert an SPFieldNumber into an int in C#? I tried to use Convert.ToInt32 but it doesn't seem to be work开发者_如何学编程ing.


You should be able to do something like:

Convert.ToInt32(MySPFieldNumber.GetFieldValue());
Convert.ToInt32(MySPFieldNumber.GetFieldValueAsText());


What if you tried to get a string representation of the SPFieldNumber object and then use Int32.Parse(spfieldnumber_string_value) ?

0

精彩评论

暂无评论...
验证码 换一张
取 消