共用方式為


SPFile.OpenBinaryStream Method (SPOpenBinaryOptions)

Opens the specified file as a stream 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 OpenBinaryStream ( _
    openOptions As SPOpenBinaryOptions _
) As Stream
'Usage
Dim instance As SPFile
Dim openOptions As SPOpenBinaryOptions
Dim returnValue As Stream

returnValue = instance.OpenBinaryStream(openOptions)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedSPType)]
public Stream OpenBinaryStream(
    SPOpenBinaryOptions openOptions
)

Parameters

Return Value

Type: System.IO.Stream
A System.IO.Stream object that represents the file.

See Also

Reference

SPFile Class

SPFile Members

OpenBinaryStream Overload

Microsoft.SharePoint Namespace

SPFile.OpenBinaryStream

Microsoft.SharePoint.SPOpenBinaryOptions