ObjectExtensions Class

Provides extension methods for the Object type.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public static class ObjectExtensions
Inheritance
Object    ObjectExtensions

Methods

Convert(Object, Type, CultureInfo) Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
ConvertTTarget(Object, CultureInfo) Converts an Object specified in the obj parameter to the desired TTarget.
DeepCloneT(T, Boolean) Clones an object by deep cloning.
Obsolete.
DeepCloneT(T, FuncObject, Object) Clones an object by deep cloning.
In(Object, Object) Gets whether item is among the elements of set.
See the Examples section of the generic InT(T, T) overload for an example.
InT(T, FuncT) Gets whether item is among the results of set.
InT(T, IEnumerableT) Gets whether item is among the results of set.
See the Examples section of the InT(T, T) overload for an example.
InT(T, T) Gets whether item is among the elements of set.
InT(T, ReadOnlySpanT) Gets whether item is among the elements of set.
See the Examples section of the InT(T, T) overload for an example.
TryConvert(Object, Type, Object) Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
TryConvert(Object, Type, CultureInfo, Object) Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
TryConvertTTarget(Object, TTarget) Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
TryConvertTTarget(Object, CultureInfo, TTarget) Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.

See Also