使用指定的类别名称密钥和类型, CategoryResourceAttribute 初始化类的新实例。
命名空间: Microsoft.VisualStudio.Modeling.Design
程序集: Microsoft.VisualStudio.Modeling.Sdk.11.0(在 Microsoft.VisualStudio.Modeling.Sdk.11.0.dll 中)
语法
声明
Public Sub New ( _
displayNameKey As String, _
type As Type _
)
public CategoryResourceAttribute(
string displayNameKey,
Type type
)
参数
- displayNameKey
类型:System.String
类别名称资源项的键在指定的资源。
- type
类型:System.Type
标识程序集包含该资源的类型。
异常
异常 | 条件 |
---|---|
ArgumentNullException | displayNameKey 为 nullnull 引用(在 Visual Basic 中为 Nothing) 或是空字符串 ("")。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。