Share via


SPUserCodeAssemblyFileDefinition.FileContents Property

Gets or sets an array of bytes that contains the contents of a file.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Property FileContents As Byte()
    Get
    Set
'Usage
Dim instance As SPUserCodeAssemblyFileDefinition
Dim value As Byte()

value = instance.FileContents

instance.FileContents = value
public byte[] FileContents { get; set; }

Property Value

Type: []
An array that contains the contents of the file.

Remarks

Between the FileContents property and FileStream property there can be only one file definition for the file content. One of these two properties must contain the file data, but never both. If both are a null reference (Nothing in Visual Basic) or empty, then the file definition will be rejected. Likewise, if both properties contain data, the file definition will also be rejected.

See Also

Reference

SPUserCodeAssemblyFileDefinition Class

SPUserCodeAssemblyFileDefinition Members

Microsoft.SharePoint.Administration Namespace