System::DynamicCast methode

System::DynamicCast(const TFrom&) method

Voert een dynamische cast uit op Exception objecten.

template<typename TTo,typename TFrom> std::enable_if<IsExceptionWrapper<TFrom>::value &&IsExceptionWrapper<TTo>::value &&(std::is_convertible<TTo, TFrom>::value||std::is_base_of<TTo, TFrom>::value), TTo>::type System::DynamicCast(const TFrom &obj)
ParameterBeschrijving
TToDoel Exception type.
TFromBron Exception type.
ParameterTypeBeschrijving
objconst TFrom&Bron‑pointer.

ReturnValue

Cast‑resultaat als de cast is toegestaan.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::DynamicCast(SmartPtr<TFrom> const&) method

Voert een dynamische cast uit op SmartPtr objecten.

template<typename TTo,typename TFrom> std::enable_if<!std::is_enum<TTo>::value &&!IsExceptionWrapper<TTo>::value, typenameCastResult<TTo>::type>::type System::DynamicCast(SmartPtr<TFrom> const &obj)
ParameterBeschrijving
TToDoel‑pointee type.
TFromBron‑pointee type.
ParameterTypeBeschrijving
objSmartPtr<TFrom> const&Bron‑pointer.

ReturnValue

Cast‑resultaat als de cast is toegestaan.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::DynamicCast(SmartPtr<TFrom>) method

Deboxt een verpakte enum via cast.

template<typename TTo,typename TFrom> std::enable_if<std::is_enum<TTo>::value, TTo>::type System::DynamicCast(SmartPtr<TFrom> obj)
ParameterBeschrijving
TToDoel enumtype.
TFromBron‑pointee type.
ParameterTypeBeschrijving
objSmartPtr<TFrom>Pointer naar het object waaruit gegevens moeten worden gedeboxed.

ReturnValue

Gedeboxte enumwaarde.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::DynamicCast(SmartPtr<TFrom>) method

Voert een dynamische cast uit op objecten naar Exception objecten.

template<typename TTo,typename TFrom> std::enable_if<std::is_same<System::Object, TFrom>::value &&IsExceptionWrapper<TTo>::value, TTo>::type System::DynamicCast(SmartPtr<TFrom> obj)
ParameterBeschrijving
TToDoel Exception type.
TFromObject type.
ParameterTypeBeschrijving
objSmartPtr<TFrom>Bron‑pointer.

ReturnValue

Cast‑resultaat als de cast is toegestaan.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::DynamicCast(std::nullptr_t) method

Voert een dynamische cast uit op null-objecten.

template<typename TTo> CastResult<TTo>::type System::DynamicCast(std::nullptr_t) noexcept
ParameterBeschrijving
TToDoel‑pointee type.

ReturnValue

nullptr.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::DynamicCast(TFrom&) method

Voert een dynamische cast uit op niet-pointer objecten.

template<typename TTo,typename TFrom> std::enable_if<!IsExceptionWrapper<TFrom>::value &&!IsSmartPtr<TFrom>::value &&std::is_convertible<TTo, TFrom>::value, TTo>::type System::DynamicCast(TFrom &obj)
ParameterBeschrijving
TToDoeltype.
TFromBrontype.
ParameterTypeBeschrijving
objTFrom&Bronobject.

ReturnValue

Castresultaat.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::DynamicCast(TFrom) method

Voert een dynamische cast uit van IntPtr naar pointer.

template<typename TTo,typename TFrom> std::enable_if<std::is_pointer<TTo>::value &&std::is_same<IntPtr, TFrom>::value, TTo>::type System::DynamicCast(TFrom value) noexcept
ParameterBeschrijving
TToDoeltype.
TFromBrontype.
ParameterTypeBeschrijving
valueTFromBron IntPtr-waarde.

ReturnValue

Castresultaat.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook