共用方式為


SPFileCollection.Add method (String, Byte[], Hashtable)

使用指定的 URL、 位元組陣列,包含檔案的內容,以及包含該檔案的中繼資料的雜湊表集合中建立的檔案。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Function Add ( _
    urlOfFile As String, _
    file As Byte(), _
    properties As Hashtable _
) As SPFile
'用途
Dim instance As SPFileCollection
Dim urlOfFile As String
Dim file As Byte()
Dim properties As Hashtable
Dim returnValue As SPFile

returnValue = instance.Add(urlOfFile, _
    file, properties)
public SPFile Add(
    string urlOfFile,
    byte[] file,
    Hashtable properties
)

參數

  • file
    Type: []

    位元組陣列,包含檔案。

傳回值

Type: Microsoft.SharePoint.SPFile
新加入的檔案。

請參閱

參照

SPFileCollection class

SPFileCollection members

Add overload

Microsoft.SharePoint namespace