获取给定类型和对象的自定义类型说明符。
命名空间: Microsoft.VisualStudio.Modeling.Design
程序集: Microsoft.VisualStudio.Modeling.Sdk.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.12.0.dll 中)
语法
声明
Public Overrides NotOverridable Function GetTypeDescriptor ( _
objectType As Type, _
instance As Object _
) As ICustomTypeDescriptor
public override sealed ICustomTypeDescriptor GetTypeDescriptor(
Type objectType,
Object instance
)
参数
- objectType
类型:System.Type
要为其检索类型说明符的对象的类型。
- instance
类型:System.Object
为其检索类型说明符的对象。
返回值
类型:System.ComponentModel.ICustomTypeDescriptor
一个给定类型和对象的自定义类型说明符。
备注
如果 instance 为 nullnull 引用(在 Visual Basic 中为 Nothing),则此方法获取 objectType的自定义类型说明符。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。