共用方式為


SPFile.OpenBinary Method (SPOpenBinaryOptions)

Opens the specified file as a byte array and specifies options that control how the file opens.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedSPType)> _
Public Function OpenBinary ( _
    openOptions As SPOpenBinaryOptions _
) As Byte()
'Usage
Dim instance As SPFile
Dim openOptions As SPOpenBinaryOptions
Dim returnValue As Byte()

returnValue = instance.OpenBinary(openOptions)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedSPType)]
public byte[] OpenBinary(
    SPOpenBinaryOptions openOptions
)

Parameters

Return Value

Type: []
Returns a byte array that contains the file content.

See Also

Reference

SPFile Class

SPFile Members

OpenBinary Overload

Microsoft.SharePoint Namespace

SPFile.OpenBinary

Microsoft.SharePoint.SPOpenBinaryOptions