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

◆ as< int32 >() [23/43]

template<>
int32 xtd::as< int32 > ( const xtd::string value,
xtd::byte  from_base 
)
inline

Casts a type into another type.

Parameters
valueobject to convert.
from_baseThe base of the number in value, which must be 2, 8, 10, or 16.
Returns
A new int32 object converted from value.
Exceptions
xtd::argument_exceptionvalue does not represent a int32.
Header
#include <xtd/as>
Namespace
xtd
Library
xtd.core
Examples
string value = "0x2A";
int32 result = as<int32>(value, 16);
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
int32 as< int32 >(std::any value)
Casts a type into another type.
Definition __as_int32.h:36