TypeConverter.GetPropertiesSupported 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回此对象是否支持属性。
GetPropertiesSupported(ITypeDescriptorContext) |
通过使用指定的上下文,返回此对象是否支持属性。 |
GetPropertiesSupported() |
返回此对象是否支持属性。 |
- Source:
- TypeConverter.cs
- Source:
- TypeConverter.cs
- Source:
- TypeConverter.cs
通过使用指定的上下文,返回此对象是否支持属性。
public:
virtual bool GetPropertiesSupported(System::ComponentModel::ITypeDescriptorContext ^ context);
C#
public virtual bool GetPropertiesSupported (System.ComponentModel.ITypeDescriptorContext context);
C#
public virtual bool GetPropertiesSupported (System.ComponentModel.ITypeDescriptorContext? context);
abstract member GetPropertiesSupported : System.ComponentModel.ITypeDescriptorContext -> bool
override this.GetPropertiesSupported : System.ComponentModel.ITypeDescriptorContext -> bool
Public Overridable Function GetPropertiesSupported (context As ITypeDescriptorContext) As Boolean
参数
- context
- ITypeDescriptorContext
一个 ITypeDescriptorContext,用于提供格式上下文。
返回
如果应调用 true
来查找此对象的属性,则为 GetProperties(Object);否则为 false
。
注解
当在此类中实现时,此方法始终返回 false
。
继承者说明
如果要转换的类型支持属性,请重写此方法。
使用 context
参数提取有关调用此转换器的环境的附加信息。 此参数可以是 null
,因此请始终检查它。 同样,上下文对象的属性可以返回 null
。
另请参阅
适用于
.NET 9 和其他版本
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
- Source:
- TypeConverter.cs
- Source:
- TypeConverter.cs
- Source:
- TypeConverter.cs
返回此对象是否支持属性。
public:
bool GetPropertiesSupported();
C#
public bool GetPropertiesSupported ();
member this.GetPropertiesSupported : unit -> bool
Public Function GetPropertiesSupported () As Boolean
返回
如果应调用 true
来查找此对象的属性,则为 GetProperties(Object);否则为 false
。
注解
当在此类中实现时,此方法始终返回 false
。
适用于
.NET 9 和其他版本
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |