System::ObjectExt::Box metod

ObjectExt::Box(const String&) method

Packar strängvärden.

SmartPtr<Object> System::ObjectExt::Box(const String &value)
ParameterTypBeskrivning
värdeconst String&Värde att boxa.

ReturnValue

Boxat värde eller null, om källsträngen är null.

Se även

ObjectExt::Box(const T&) method

Boxar värdetyper för konvertering till Object. Implementation för enum‑typer.

template<typename T> static std::enable_if<std::is_enum<T>::value, System::SmartPtr<System::Object>>::type System::ObjectExt::Box(const T &value)
ParameterBeskrivning
TEnum typ.
ParameterTypBeskrivning
valueconst T&Enum värde att låsa in.

ReturnValue

Smart‑pekare till objekt som behåller det boxade värdet.

Se även

ObjectExt::Box(const T&) method

Boxar värdetyper för konvertering till Object. Implementation för icke‑enum‑typer.

template<typename T> static std::enable_if<!std::is_enum<T>::value &&!IsNullable<T>::value, System::SmartPtr<System::Object>>::type System::ObjectExt::Box(const T &value)
ParameterBeskrivning
TVärdetyp.
ParameterTypBeskrivning
värdeconst T&Värde att boxa.

ReturnValue

Smart‑pekare till objekt som behåller det boxade värdet.

Se även

ObjectExt::Box(const T&) method

Boxar Nullable‑typer för konvertering till Object.

template<typename T> static std::enable_if<IsNullable<T>::value, System::SmartPtr<System::Object>>::type System::ObjectExt::Box(const T &value)
ParameterBeskrivning
TVärdetyp.
ParameterTypBeskrivning
värdeconst T&Värde att boxa.

ReturnValue

Smart‑pekare till objekt som behåller det boxade värdet.

Se även