ExpandableNullableObjectConverter Class
Provides a TypeConverter to convert objects to and from other representations.
public class ExpandableNullableObjectConverter : ExpandableObjectConverter
- Inheritance:
- object TypeConverter ExpandableObjectConverter object
Remarks
This class places the text (none) in a property grid when an object reference is null.
Constructors
ExpandableNullableObjectConverter()
Initializes an instance of the class.
public ExpandableNullableObjectConverter()
Methods
CanConvertTo(ITypeDescriptorContext?, Type?)
Returns whether this converter can convert the object to the specified type, using the specified context.
public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType)
| Parameter | Type | Description |
|---|---|---|
| context | ITypeDescriptorContext | An ITypeDescriptorContext that provides a format context. |
| destinationType | Type | A Type that represents the type you want to convert to. |
Returns
- bool:
trueif this converter can perform the conversion; otherwise,false.
ConvertTo(ITypeDescriptorContext?, CultureInfo?, object?, Type)
Converts the given value object to the specified type, using the specified context and culture information.
public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
| Parameter | Type | Description |
|---|---|---|
| context | ITypeDescriptorContext | An ITypeDescriptorContext that provides a format context. |
| culture | CultureInfo | A CultureInfo. If |
| value | object | The object to convert. |
| destinationType | Type | The Type to convert the |
Returns
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | The |
| NotSupportedException | The conversion cannot be performed. |
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()