xtd 0.2.0
Loading...
Searching...
No Matches

◆ as() [51/52]

template<typename new_type_t , typename current_type_t >
xtd::sptr< new_type_t > xtd::as ( xtd::sptr< current_type_t > &  value)

Casts a type into another type.

Header
#include <xtd/as>
Namespace
xtd
Library
xtd.core
Examples
xtd::sptr<control> result = as<xtd::forms::control>(xtd::new_sptr<xtd::forms::button>());
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
Exceptions
xtd::invalid_cast_exceptionthe parameters is bad cast.