SPListItemCollection.Add 方法 (String, SPFileSystemObjectType, String)

Creates an item that uses the specified folder URL, object type, and leaf name but requires the SPListItem.Update method to actually add the item to the list.

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

语法

声明
Public Function Add ( _
    folderUrl As String, _
    underlyingObjectType As SPFileSystemObjectType, _
    leafName As String _
) As SPListItem
用法
Dim instance As SPListItemCollection
Dim folderUrl As String
Dim underlyingObjectType As SPFileSystemObjectType
Dim leafName As String
Dim returnValue As SPListItem

returnValue = instance.Add(folderUrl, _
    underlyingObjectType, leafName)
public SPListItem Add(
    string folderUrl,
    SPFileSystemObjectType underlyingObjectType,
    string leafName
)

参数

  • folderUrl
    类型:System.String

    The server-relative URL of the folder, beginning with a forward slash; for example, /sites/mysite/subweb/Lists/mylist/myfolder.

  • leafName
    类型:System.String

    The file name, including the file extension; for example, mydoc.doc. For more information, see the Name property.

返回值

类型:Microsoft.SharePoint.SPListItem
The new item.

另请参阅

引用

SPListItemCollection 类

SPListItemCollection 成员

Add 重载

Microsoft.SharePoint 命名空间