初始化基于指定的名称和资源类型的SPUserResource类的新实例。
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Sub New ( _
name As String, _
type As SPResourceType _
)
用法
Dim name As String
Dim type As SPResourceType
Dim instance As New SPUserResource(name, type)
public SPUserResource(
string name,
SPResourceType type
)
参数
name
类型:System.String一个字符串,指定用户资源的名称。名称必须以字母数字字符开头,并且不能为 null 。
type
类型:Microsoft.SharePoint.SPResourceType枚举值,该值指定资源是单行文本或多行。
异常
| 异常 | 条件 |
|---|---|
| ArgumentNullException | name是 null 或该表为空。 |
| ArgumentException | name参数的值不以字母数字字符开头。 |