Click or drag to resize

ObjectExtension Class

Provides extension methods for converting object instances.
Inheritance Hierarchy
SystemObject
  TB.ComponentModelObjectExtension

Namespace:  TB.ComponentModel
Assembly:  UniversalTypeConverter (in UniversalTypeConverter.dll) Version: 2.0.0
Syntax
C#
public static class ObjectExtension

The ObjectExtension type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAsT
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.
Public methodStatic memberCanConvert Obsolete.
For backward compatibility only. Use IsConvertibleTo(Object, Type, CultureInfo) instead.
Public methodStatic memberCanConvertToT Obsolete.
Public methodStatic memberConvert Obsolete.
For backward compatibility only. Use To(Object, Type, CultureInfo) instead.
Public methodStatic memberConvertToT Obsolete.
Public methodStatic memberConvertToEnumerable(IEnumerable, Type) Obsolete.
For backward compatibility only. Use ToEnumerable(IEnumerable, Type, CultureInfo) instead.
Public methodStatic memberConvertToEnumerableT(IEnumerable) Obsolete.
Public methodStatic memberIsConvertibleTo(Object, Type, CultureInfo)
Determines whether the given value can be converted to the specified type using the default converter.
Public methodStatic memberIsConvertibleTo(Object, Type, Object, CultureInfo)
Converts the given value to the given type using the default converter. A return value indicates whether the operation succeeded.
Public methodStatic memberIsConvertibleToT(Object, CultureInfo)
Determines whether the given value can be converted to the specified type using the default converter.
Public methodStatic memberIsConvertibleToT(Object, T, CultureInfo)
Converts the given value to the given type using the default converter. A return value indicates whether the operation succeeded.
Public methodStatic memberTo(Object, Type, CultureInfo)
Converts the given value to the given type using the default converter.
Public methodStatic memberToT(Object, CultureInfo)
Converts the given value to the given type using the default converter.
Public methodStatic memberToDictionary
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.
Public methodStatic memberTryConvert Obsolete.
For backward compatibility only. Use IsConvertibleTo(Object, Type, CultureInfo) instead.
Public methodStatic memberTryConvertToT Obsolete.
Top
See Also