Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've created custom list via browser, and set one of it's column's type to Number. I've set number of decimals to 0, so I was expecting, that numbers this column will store would be of type integer. However when I retrieve values from list programmatically, all the values in this column are doubles, so if I inserted 1, now the returning value is 1.0.

How can I configure my list, so this column will store numbers as integers ?

I'm using SharePoint 2010.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The column is a double value, it just won't store any precision. Convert to int to use as an int: c# ToInt32

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.