NewItemFactory.GetDisplayName 方法
获取指定 Type 的显示名称,该名称可添加到集合编辑器或子属性编辑器中。
命名空间: Microsoft.Windows.Design.PropertyEditing
程序集: Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)
语法
声明
Public Overridable Function GetDisplayName ( _
type As Type _
) As String
public virtual string GetDisplayName(
Type type
)
public:
virtual String^ GetDisplayName(
Type^ type
)
abstract GetDisplayName :
type:Type -> string
override GetDisplayName :
type:Type -> string
public function GetDisplayName(
type : Type
) : String
参数
- type
类型:System.Type
要获取其显示名称的类型。
返回值
类型:System.String
要为 type 显示的名称。
异常
异常 | 条件 |
---|---|
ArgumentNullException | type 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
备注
此方法返回显示在“添加项”下拉框中的名称,该名称用来标识要添加的 Type。 默认实现返回 Type 的短名称。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
Microsoft.Windows.Design.PropertyEditing 命名空间