Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the contents of the specified file.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function GetFileContents ( _
fileName As String _
) As Byte()
'Usage
Dim instance As SPUserCodeCachedAssemblyGroup
Dim fileName As String
Dim returnValue As Byte()
returnValue = instance.GetFileContents(fileName)
public byte[] GetFileContents(
string fileName
)
Parameters
fileName
Type: System.StringThe name of the file.
Return value
Type: []
An array of bytes that contains the contents of the specified file.
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | The specified file is larger than the maximum supported file size. |
Remarks
This method does not support files that contain more than MaxValue bytes, or greater than 2GB in size.
See also
Reference
SPUserCodeCachedAssemblyGroup class