System::ObjectExt class

ObjectExt class

Provides static methods that emulate C# Object methods called for non-Object C++ types (strings, numbers, etc.). This is a static type with no instance services. You should never create instances of it by any means.

class ObjectExt : public System::ObjectType

Methods

MethodDescription
static ArrayInitializerCast(From …)Converts array fundamental values (which C# does implicitly but C++ apparently does not).
static Box(const T&)Boxes value types for converting to Object. Implementation for enum types.
static Box(const T&)Boxes value types for converting to Object. Implementation for non-enum types.
static Box(const T&)Boxes Nullable types for converting to Object.
static Box(const String&)Boxes string values.
static BoxEnum(T)Boxes enum types for being propagated as Object.
static CastToIList(const SmartPtr<Object>&)
static Coalesce(T0, T1)Implementation of ‘??’ operator translation for non-nullable types.
static Coalesce(System::Nullable<T0>, T1)Implementation of ‘??’ operator translation for nullable types.
static CoalesceInternal(RT1, F)Implementation of ‘??’ operator translation for non-nullable types. Overload for case if RT2 is convertable to RT1.
static Equals(const T&, const T2&)
static Equals(const T&, const T2&)Substitution for C# Object.Equals calls working for any type in C++. Overload for smart pointer types.
static Equals(T, const T2&)Substitution for C# Object.Equals calls working for any type in C++. Overload for structure types.
static Equals(const T&, const T2&)Substitution for C# Object.Equals calls working for any type in C++. Overload for scalar types.
static Equals(const char_t(&), String)Substitution for C# Object.Equals calls working for any type in C++. Overload for string literal with string comparison.
static Equals(const float&, const float&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
static Equals(const double&, const double&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
static ExplicitCastToObject(const T&)
static ExplicitCastToObject(const T&)
static GetHashCode(const T&)Implements GetHashCode() calls; works on both Object subclasses and unrelated types.
static Is(const U&)Implements ‘is’ operator translation. Specialization for pointer types optimized for ‘final’ classes.
static Is(const U&)Implements ‘is’ operator translation. Specialization for pointer types.
static Is(const Object&)Implements ‘is’ operator translation. Specialization for value types.
static Is(const Object&)Implements ‘is’ operator translation. Specialization for unconvertible types.
static Is(const SmartPtr<U>&)Implements ‘is’ operator translation. Specialization for pointer types.
static Is(const ExceptionWrapper<U>&)Implements ‘is’ operator translation. Specialization for exception wrapper types.
static Is(const SmartPtr<Object>&)Implements ‘is’ operator translation. Specialization for nullable types.
static Is(const SmartPtr<Object>&)Implements ‘is’ operator translation. Specialization for boxable types with == operator defined.
static Is(const SmartPtr<Object>&)Implements ‘is’ operator translation. Specialization for boxable types without defined ==.
static Is(const SmartPtr<U>&)Implements ‘is’ operator translation. Specialization for enum types.
static Is(const WeakPtr<U>&)Implements ‘is’ operator translation. Specialization for enum types vs weak pointers.
static Is(const Nullable<U>&)Implements ‘is’ operator translation. Specialization for Nullable type.
static Is(const char16_t *)Implements ‘is’ operator translation. Specialization for string literal.
static Is(int32_t)Implements ‘is’ operator translation. Specialization for integer literal.
static IsBoxedValue(const SmartPtr<Object>&)Checks if object is a boxed value.
static ObjectToUnknown(SmartPtr<Object>)Converts Object to unknown type, handling both smart pointer type and bpxed value situations.
static ObjectToUnknown(SmartPtr<Object>)Converts Object to unknown type, handling both smart pointer type and boxed value situations.
static ToString(const char_t *)Substitution for C# ToString method to work on any C++ type.
static ToString(const Nullable<T>&)Substitution for C# ToString method to work on any C++ type.
static ToString(const T&)Substitution for C# ToString method to work on any C++ type.
static ToString(const T&)Substitution for C# ToString method to work on any C++ type.
static ToString(T&)Substitution for C# ToString method to work on any C++ type.
static ToString(T&)Substitution for C# ToString method to work on any C++ type.
static ToString(T&&)Substitution for C# ToString method to work on any C++ type.
static ToString(T&)Substitution for C# ToString method to work on any C++ type.
static ToString(const T&)Substitution for C# ToString method to work on any C++ type.
static ToString(T&&)Substitution for C# ToString method to work on any C++ type.
static Unbox(const SmartPtr<Object>&)Unboxes value types after converting to Object. Implementation for enum types.
static Unbox(const SmartPtr<Object>&)Unboxes value types after converting to Object. Implementation for non-enum & non-nullable types.
static Unbox(const SmartPtr<Object>&)Unboxes value types after converting to Object. Implementation for non-enum & non-nullable types.
static Unbox(E)Unboxes enum types to integer.
static Unbox(E)Converts enum types.
static Unbox(const SmartPtr<Object>&)Unboxes string values.
static UnboxStringSafe(const SmartPtr<Object>&)Unboxes string from boxed value.
static UnboxToNullable(const SmartPtr<Object>&, bool)Unboxes object to nullable type.
static UnknownIsNull(T)Checks whether unknown type object is nullptr. Overload for non-scalar types.
static UnknownIsNull(T)Checks whether unknown type object is nullptr. Overload for scalar types.
static UnknownToObject(T)Converts unknown type to Object, handling both smart pointer type and value type situations.
static UnknownToObject(const T&)Converts unknown type to Object, handling both smart pointer type and value type situations.

See Also