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

◆ has_value()

bool xtd::any_object::has_value ( ) const
inlinenoexcept

Gets a value indicating whether the current xtd::any_object object has a valid value of its underlying type.

Returns
true if the current xtd::any_object object has a value; false if the current xtd::any_object object has no value.
Remarks
If the xtd::any_object::has_value property is true, the value of the current xtd::any_object object can be accessed with the xtd::any_object::value property. Otherwise, attempting to access its value throws an xtd::invalid_operation_exception exception.