Click or drag to resize
MimeKit

InternetAddressConverterIsValid(ITypeDescriptorContext, Object) Method

Returns whether the given value object is valid for this type and for the specified context.

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.12.0
Syntax
C#
public override bool IsValid(
	ITypeDescriptorContext context,
	Object value
)

Parameters

context  ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
value  Object
The Object to test for validity.

Return Value

Boolean
if the specified value is valid for this object; otherwise, .
Remarks

Use the context parameter to extract additional information about the environment from which this converter is invoked. This parameter can be , so always check it. Also, properties on the context object can return .

Starting in .NET Framework 4, the IsValid(ITypeDescriptorContext, Object) method catches exceptions from the CanConvertFrom(ITypeDescriptorContext, Type) and ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) methods. If the input value type causes CanConvertFrom(ITypeDescriptorContext, Type) to return , or if the input value causes ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) to raise an exception, the IsValid(ITypeDescriptorContext, Object) method returns .

See Also