SPUserResource constructor (String, String, SPResourceType)
Initializes a new instance of the SPUserResource class based on a specified name, value, and resource type.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub New ( _
name As String, _
value As String, _
type As SPResourceType _
)
'Usage
Dim name As String
Dim value As String
Dim type As SPResourceType
Dim instance As New SPUserResource(name, value, _
type)
public SPUserResource(
string name,
string value,
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 .
value
Type: System.StringA string that specifies the value of the resource for the culture of the current thread.
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. |