ObjectExtension Class |
Namespace: TB.ComponentModel
public static class ObjectExtension
The ObjectExtension type exposes the following members.
Name | Description | |
---|---|---|
AsT |
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.
| |
CanConvert | Obsolete.
For backward compatibility only. Use IsConvertibleTo(Object, Type, CultureInfo) instead.
| |
CanConvertToT | Obsolete.
For backward compatibility only. Use IsConvertibleToT(Object, CultureInfo) instead.
| |
Convert | Obsolete.
For backward compatibility only. Use To(Object, Type, CultureInfo) instead.
| |
ConvertToT | Obsolete.
For backward compatibility only. Use ToT(Object, CultureInfo) instead.
| |
ConvertToEnumerable(IEnumerable, Type) | Obsolete.
For backward compatibility only. Use ToEnumerable(IEnumerable, Type, CultureInfo) instead.
| |
ConvertToEnumerableT(IEnumerable) | Obsolete.
For backward compatibility only. Use ToEnumerableT(IEnumerable, CultureInfo) instead.
| |
IsConvertibleTo(Object, Type, CultureInfo) |
Determines whether the given value can be converted to the specified type using the default converter.
| |
IsConvertibleTo(Object, Type, Object, CultureInfo) |
Converts the given value to the given type using the default converter.
A return value indicates whether the operation succeeded.
| |
IsConvertibleToT(Object, CultureInfo) |
Determines whether the given value can be converted to the specified type using the default converter.
| |
IsConvertibleToT(Object, T, CultureInfo) |
Converts the given value to the given type using the default converter.
A return value indicates whether the operation succeeded.
| |
To(Object, Type, CultureInfo) |
Converts the given value to the given type using the default converter.
| |
ToT(Object, CultureInfo) |
Converts the given value to the given type using the default converter.
| |
ToDictionary |
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.
| |
TryConvert | Obsolete.
For backward compatibility only. Use IsConvertibleTo(Object, Type, CultureInfo) instead.
| |
TryConvertToT | Obsolete.
For backward compatibility only. Use IsConvertibleToT(Object, CultureInfo) instead.
|