3

I have a Field, that has Type="Number". What type of variables can I assign to it? Will the field support float or double?

oListItem["numberField"] = data;

What type can data be?

Tschareck
  • 4,071
  • 9
  • 47
  • 74

1 Answers1

3

All values that's string representation can be parsed as double, since SharePoint converts the input value to a string:

case SPFieldType.Number:
case SPFieldType.Currency:
  str1 = Convert.ToString(value, (IFormatProvider) CultureInfo.InvariantCulture);
  break;

(from SPListItem.SetValue(...))

You should be fine with string, int, double, etc.

Stefan
  • 14,530
  • 4
  • 55
  • 62