Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个字段,有Type="Number". 我可以分配什么类型的变量?将现场支持float或double?
Type="Number"
float
double
oListItem["numberField"] = data;
可以是什么类型data?
data
由于 SharePoint 将输入值转换为字符串,因此所有字符串表示形式的值都可以解析为双精度值:
case SPFieldType.Number: case SPFieldType.Currency: str1 = Convert.ToString(value, (IFormatProvider) CultureInfo.InvariantCulture); break;
(来自SPListItem.SetValue(...))
你应该对string, int,double等没问题。
string
int