SPUserResource constructor (String, SPResourceType)
Initializes a new instance of the SPUserResource class based on a specified name and resource type.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub New ( _
name As String, _
type As SPResourceType _
)
'Usage
Dim name As String
Dim type As SPResourceType
Dim instance As New SPUserResource(name, type)
public SPUserResource(
string name,
SPResourceType type
)
Parameters
name
Type: System.StringA string that specifies the name for the user resource. The name must begin with an alphanumeric character and cannot be null .
type
Type: Microsoft.SharePoint.SPResourceTypeAn enumeration value that specifies whether the resource is a single line of text or multiple lines.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | name is null or empty. |
ArgumentException | The value of the name parameter does not start with an alphanumeric character. |