Sorry if the question sounds stupid... but how do I convert an SPFieldNumber into an int in C#?
I tried Convert.ToInt32, but doesnt seem to be working.
Thanks.
Sorry if the question sounds stupid... but how do I convert an SPFieldNumber into an int in C#?
I tried Convert.ToInt32, but doesnt seem to be working.
Thanks.
What if you tried to get a string representation of the SPFieldNumber object and then use Int32.Parse(spfieldnumber_string_value) ?
You should be able to do something like:
Convert.ToInt32(MySPFieldNumber.GetFieldValue());
Convert.ToInt32(MySPFieldNumber.GetFieldValueAsText());