共用方式為


SPFile.SaveBinary method (Byte[], Boolean)

根據指定的位元組陣列和布林值,指定是否要檢查必要的欄位的二進位格式儲存的檔案。

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

Syntax

'宣告
Public Sub SaveBinary ( _
    file As Byte(), _
    checkRequiredFields As Boolean _
)
'用途
Dim instance As SPFile
Dim file As Byte()
Dim checkRequiredFields As Boolean

instance.SaveBinary(file, checkRequiredFields)
public void SaveBinary(
    byte[] file,
    bool checkRequiredFields
)

參數

  • file
    Type: []

    位元組陣列,包含檔案。

  • checkRequiredFields
    Type: System.Boolean

    true來檢查必要的欄位時儲存檔案。否則, false。

Exceptions

Exception Condition
SPException

儲存檔案時發生錯誤。

備註

這個方法會呼叫SaveBinary(Stream, Boolean, Boolean, String, String, Stream, String)與new MemoryStream(file)、 checkRequiredFields、 false、 null 、 null 、 null ,未使用的字串。

請參閱

參照

SPFile class

SPFile members

SaveBinary overload

Microsoft.SharePoint namespace