FieldCollection.Add 方法

将字段添加到字段集合中。

命名空间:  Microsoft.SharePoint.Client
程序集:   Microsoft.SharePoint.Client.Silverlight(位于 Microsoft.SharePoint.Client.Silverlight.dll 中);  Microsoft.SharePoint.Client.Phone(位于 Microsoft.SharePoint.Client.Phone.dll 中)  Microsoft.SharePoint.Client(位于 Microsoft.SharePoint.Client.dll 中)

语法

声明
Public Function Add ( _
    field As Field _
) As Field
用法
Dim instance As FieldCollection
Dim field As Field
Dim returnValue As Field

returnValue = instance.Add(field)
public Field Add(
    Field field
)

参数

返回值

类型:Microsoft.SharePoint.Client.Field
返回表示的字段添加到的字段集合Field实例。

异常

异常 条件
[Microsoft.SharePoint.SPException]

它不是有效的文件名或它不是服务器相对 URL 或不是绝对 URL。错误代码 ︰-2146232832。

[Microsoft.SharePoint.SPException]

字段不存在。错误代码 ︰-2130575340。

[Microsoft.SharePoint.SPException]

公式为空的计算的字段类型。错误代码 ︰-2130575199。

[Microsoft.SharePoint.SPQueryThrottledException]

没有限制失败。错误代码 ︰-2147024860。

[Microsoft.SharePoint.SPQueryThrottledException]

没有加入其出现下滑失败。错误代码 ︰-2147024749。

[System.ArgumentException]

在给定的范围集合中不存在字段指定内部名称或标题。错误代码 ︰-2147024809。

[System.UnauthorizedAccessException]

当前用户没有足够的权限。错误代码 ︰ 为-2147024891。

另请参阅

引用

FieldCollection 类

FieldCollection 成员

Microsoft.SharePoint.Client 命名空间