List.AddItem 方法

Creates a new list item in the list.

命名空间:  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 AddItem ( _
    parameters As ListItemCreationInformation _
) As ListItem
用法
Dim instance As List
Dim parameters As ListItemCreationInformation
Dim returnValue As ListItem

returnValue = instance.AddItem(parameters)
public ListItem AddItem(
    ListItemCreationInformation parameters
)

参数

返回值

类型:Microsoft.SharePoint.Client.ListItem
Returns a ListItem instance representing the creation of a new list item in the list.

异常

异常 条件
[Microsoft.SharePoint.SPException]

Folder for the new list item does not exist or the current user lacks permissions to the folder. Error code: -2130575312. The leafname contains an invalid character. Error code: -2130575245.

[System.ArgumentOutOfRangeException]

ListItemCreationInformation.UnderlyingObjectType is not valid. Error code: -2146233086.

[System.UnauthorizedAccessException]

The current user has insufficient permissions. Error code: -2147024891.

另请参阅

引用

List 类

List 成员

Microsoft.SharePoint.Client 命名空间