共用方式為


SPFileCollection.Add method (String, Stream, SPFileCollectionAddParameters)

使用指定的 URL 包含的檔案,而SPFileCollectionAddParameters物件內容的資料流的集合中建立的檔案。

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

Syntax

'宣告
Public Function Add ( _
    urlOfFile As String, _
    file As Stream, _
    parameters As SPFileCollectionAddParameters _
) As SPFile
'用途
Dim instance As SPFileCollection
Dim urlOfFile As String
Dim file As Stream
Dim parameters As SPFileCollectionAddParameters
Dim returnValue As SPFile

returnValue = instance.Add(urlOfFile, _
    file, parameters)
public SPFile Add(
    string urlOfFile,
    Stream file,
    SPFileCollectionAddParameters parameters
)

參數

傳回值

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

請參閱

參照

SPFileCollection class

SPFileCollection members

Add overload

Microsoft.SharePoint namespace