Partager via


List.AddItem - Méthode

Creates a new list item in the list.

Espace de noms :  Microsoft.SharePoint.Client
Assemblys :   Microsoft.SharePoint.Client.Silverlight (dans Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (dans Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (dans Microsoft.SharePoint.Client.dll)

Syntaxe

'Déclaration
Public Function AddItem ( _
    parameters As ListItemCreationInformation _
) As ListItem
'Utilisation
Dim instance As List
Dim parameters As ListItemCreationInformation
Dim returnValue As ListItem

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

Paramètres

Valeur renvoyée

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

Exceptions

Exception Condition
[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.

Voir aussi

Référence

List classe

List - Membres

Microsoft.SharePoint.Client - Espace de noms