VersionConverter.IsValid(ITypeDescriptorContext, Object) 方法

定义

返回一个值,该值指示给定值对象对于此类型和此指定的上下文是否有效。Returns a value that indicates whether the given value object is valid for this type and for the specified context.

public:
 override bool IsValid(System::ComponentModel::ITypeDescriptorContext ^ context, System::Object ^ value);
public override bool IsValid (System.ComponentModel.ITypeDescriptorContext context, object value);
override this.IsValid : System.ComponentModel.ITypeDescriptorContext * obj -> bool
Public Overrides Function IsValid (context As ITypeDescriptorContext, value As Object) As Boolean

参数

context
ITypeDescriptorContext

一个 ITypeDescriptorContext,用于提供格式上下文。An ITypeDescriptorContext that provides a format context.

value
Object

要测试其有效性的对象。The object to test for validity.

返回

Boolean

如果指定的值对此对象有效,则为 true;否则为 falsetrue if the specified value is valid for this object; otherwise, false.

适用于

另请参阅