System::Nullable::operator= 方法

Nullable::operator=(const Nullable<T1>&) method

用指定的值替换对象当前表示的值。

template<typename T1> Nullable<T> & System::Nullable<T>::operator=(const Nullable<T1> &x)
参数描述
当前对象将要表示的新值的类型
参数类型描述
xconst Nullable<T1>&当前对象将要表示的新值

ReturnValue

对自身的引用

另见

Nullable::operator=(const T1&) method

用指定的值替换对象当前表示的值。

template<typename T1> std::enable_if<!IsNullable<T1>::value &&!std::is_null_pointer<T1>::value, Nullable<T> &>::type System::Nullable<T>::operator=(const T1 &x)
参数描述
当前对象将要表示的新值的类型
参数类型描述
xconst T1&当前对象将要表示的新值

ReturnValue

对自身的引用

另见

Nullable::operator=(std::nullptr_t) method

将空值赋给当前对象。

template<typename T1,typename> Nullable<T> System::Nullable<T>::operator=(std::nullptr_t)

ReturnValue

一个表示 null 值的 Nullable 对象。

另见