Click or drag to resize

ConversionResultT Class

Represents the result of a conversion.
Inheritance Hierarchy
SystemObject
  TB.ComponentModelConversionResultT

Namespace:  TB.ComponentModel
Assembly:  UniversalTypeConverter (in UniversalTypeConverter.dll) Version: 2.0.0
Syntax
C#
public class ConversionResult<T>

Type Parameters

T

The ConversionResultT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyHasValue
Indicates whether this result has a valid value.
Public propertyValue
Gets the value of the conversion if succeeded.
Top
Methods
  NameDescription
Public methodOr
Returns Value if HasValue is true; otherwise the given value.
Public methodOrDefault
Returns Value if HasValue is true; otherwise the default value of the underlying type.
Public methodToString
Returns a string that represents the current object.
(Overrides ObjectToString.)
Top
Extension Methods
  NameDescription
Public Extension MethodAsT
Converts the given value to the given type using the default converter. The result provides access to the converted value if conversion succeeded and simplifies access to default values if conversion failed.
(Defined by ObjectExtension.)
Public Extension MethodCanConvert
For backward compatibility only. Use IsConvertibleTo(Object, Type, CultureInfo) instead.
(Defined by ObjectExtension.)
Public Extension MethodCanConvertToT (Defined by ObjectExtension.)
Public Extension MethodConvert
For backward compatibility only. Use To(Object, Type, CultureInfo) instead.
(Defined by ObjectExtension.)
Public Extension MethodConvertToT (Defined by ObjectExtension.)
Public Extension MethodIsConvertibleTo(Type, CultureInfo)Overloaded.
Determines whether the given value can be converted to the specified type using the default converter.
(Defined by ObjectExtension.)
Public Extension MethodIsConvertibleTo(Type, Object, CultureInfo)Overloaded.
Converts the given value to the given type using the default converter. A return value indicates whether the operation succeeded.
(Defined by ObjectExtension.)
Public Extension MethodIsConvertibleToT(CultureInfo)Overloaded.
Determines whether the given value can be converted to the specified type using the default converter.
(Defined by ObjectExtension.)
Public Extension MethodIsConvertibleToT(T, CultureInfo)Overloaded.
Converts the given value to the given type using the default converter. A return value indicates whether the operation succeeded.
(Defined by ObjectExtension.)
Public Extension MethodTo(Type, CultureInfo)Overloaded.
Converts the given value to the given type using the default converter.
(Defined by ObjectExtension.)
Public Extension MethodToT(CultureInfo)Overloaded.
Converts the given value to the given type using the default converter.
(Defined by ObjectExtension.)
Public Extension MethodToDictionary
Creates a new dictionary whose key value pairs represent all non static public values of the given source. If source is null, an empty dictionary is created. If source has no non static public properties or fields (eg. int), the dictionary contains only one key named "Value" representing the given value itself.
(Defined by ObjectExtension.)
Public Extension MethodTryConvert
For backward compatibility only. Use IsConvertibleTo(Object, Type, CultureInfo) instead.
(Defined by ObjectExtension.)
Public Extension MethodTryConvertToT (Defined by ObjectExtension.)
Top
See Also