System::DefaultBoxedValue 类

DefaultBoxedValue class

BoxedValue class implementation. Allows it BoxingValue specializations to be declared without duplicating common code. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

template<class T>class DefaultBoxedValue : public System::Object

方法

方法描述
DefaultBoxedValue(const T&)构造一个表示指定值的 DefaultBoxedValue 类的新实例。
Equals(ptr) override确定当前对象和指定对象所表示的装箱值是否相等。
GetHashCode() const override返回当前对象的哈希码。
GetType() const override获取对象的实际类型。
is() const确定当前对象所表示的装箱值的类型是否为 V
ToString() const override返回装箱值的字符串表示。
unbox() const对装箱值进行拆箱。

另见