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

◆ from_binary()

static date_time xtd::date_time::from_binary ( int64  date_data)
static

Deserializes a 64-bit binary value and recreates an original serialized xtd::date_time object.

Parameters
date_dataA 64-bit signed integer that encodes the xtd::date_time::kind property in a 2-bit field and the xtd::date_time::ticks property in a 62-bit field.
Returns
An object that is equivalent to the xtd::date_time object that was serialized by the xtd::date_time::to_binary() method.
Exceptions
xtd::argument_exceptiondate_data is less than xtd::date_time::min_value or greater than xtd::date_time::max_value.
Remarks
Use the xtd::date_time::to_binary method to convert the value of the current xtd::date_time object to a binary value. Subsequently, use the binary value and the xtd::date_time::from_binary method to recreate the original xtd::date_time object.
Note
In some cases, the xtd::date_time value returned by the xtd::date_time::from_binary method is not identical to the original xtd::date_time value supplied to the xtd::date_time::to_binary method.