Metode System::DynamicCast

System::DynamicCast(const TFrom&) method

Melakukan cast dinamis pada objek Exception.

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)
ParameterDeskripsi
TToTipe Exception target.
TFromTipe Exception sumber.
ParameterTipeDeskripsi
objconst TFrom&Pointer sumber.

ReturnValue

Hasil cast jika cast diizinkan.

Deprecated

Dibiarkan untuk kompatibilitas mundur. Gunakan ExplicitCast sebagai gantinya.

Lihat Juga

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

Melakukan cast dinamis pada objek SmartPtr.

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)
ParameterDeskripsi
TToTipe pointee target.
TFromTipe pointee sumber.
ParameterTipeDeskripsi
objSmartPtr<TFrom> const&Pointer sumber.

ReturnValue

Hasil cast jika cast diizinkan.

Deprecated

Dibiarkan untuk kompatibilitas mundur. Gunakan ExplicitCast sebagai gantinya.

Lihat Juga

System::DynamicCast(SmartPtr<TFrom>) method

Membuka enum yang dibungkus melalui cast.

template<typename TTo,typename TFrom> std::enable_if<std::is_enum<TTo>::value, TTo>::type System::DynamicCast(SmartPtr<TFrom> obj)
ParameterDeskripsi
TToTipe enum target.
TFromTipe pointee sumber.
ParameterTipeDeskripsi
objSmartPtr<TFrom>Pointer ke objek untuk membuka data dari.

ReturnValue

Nilai enum yang telah dibuka.

Deprecated

Dibiarkan untuk kompatibilitas mundur. Gunakan ExplicitCast sebagai gantinya.

Lihat Juga

System::DynamicCast(SmartPtr<TFrom>) method

Melakukan cast dinamis pada Objek menjadi objek Exception.

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)
ParameterDeskripsi
TToTipe Exception target.
TFromTipe Object.
ParameterTipeDeskripsi
objSmartPtr<TFrom>Pointer sumber.

ReturnValue

Hasil cast jika cast diizinkan.

Deprecated

Dibiarkan untuk kompatibilitas mundur. Gunakan ExplicitCast sebagai gantinya.

Lihat Juga

System::DynamicCast(std::nullptr_t) method

Melakukan cast dinamis pada objek null.

template<typename TTo> CastResult<TTo>::type System::DynamicCast(std::nullptr_t) noexcept
ParameterDeskripsi
TToTipe pointee target.

ReturnValue

nullptr.

Deprecated

Dibiarkan untuk kompatibilitas mundur. Gunakan ExplicitCast sebagai gantinya.

Lihat Juga

System::DynamicCast(TFrom&) method

Melakukan cast dinamis pada objek non-pointer.

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)
ParameterDeskripsi
TToTipe target.
TFromTipe sumber.
ParameterTipeDeskripsi
objTFrom&Objek sumber.

ReturnValue

Hasil cast.

Deprecated

Dibiarkan untuk kompatibilitas mundur. Gunakan ExplicitCast sebagai gantinya.

Lihat Juga

System::DynamicCast(TFrom) method

Melakukan cast dinamis dari IntPtr ke 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
ParameterDeskripsi
TToTipe target.
TFromTipe sumber.
ParameterTipeDeskripsi
valueTFromNilai IntPtr sumber.

ReturnValue

Hasil cast.

Deprecated

Dibiarkan untuk kompatibilitas mundur. Gunakan ExplicitCast sebagai gantinya.

Lihat Juga