System::operator== 方法

System::operator==(ArraySegment<T>, ArraySegment<T>) method

template<typename T> bool System::operator==(ArraySegment<T> a, ArraySegment<T> b)

另见

System::operator==(Chars&, const String&) method

String comparison.

template<class Chars,typename std::enable_if< IsStringLiteral< Chars, char_t >::value >::type *> bool System::operator==(Chars &left, const String &right)
Parameter描述
CharsString 字面量类型。
ParameterType描述
leftChars&String 用于比较的字面量。
rightconst String&String 用于比较。

ReturnValue

如果字符串匹配则为 true,否则为 false。

另见

System::operator==(const SharedPtr<Object>&, const String&) method

Object and string comparison.

bool System::operator==(const SharedPtr<Object> &left, const String &right)
ParameterType描述
leftconst SharedPtr<Object>&Object 用于转换为字符串并比较。
rightconst String&String 用于比较。

ReturnValue

如果对象的字符串表示等于该字符串则为 true,否则为 false。

另见

System::operator==(const SharedPtr<Uri>&, const SharedPtr<Uri>&) method

确定当前对象和指定对象所表示的 URI 是否相等。

bool System::operator==(const SharedPtr<Uri> &uri1, const SharedPtr<Uri> &uri2)
ParameterType描述
uri1const SharedPtr<Uri>&要比较的第一个 Uri 对象
uri2const SharedPtr<Uri>&要比较的第二个 Uri 对象

ReturnValue

如果 URI 相等则为 true,否则为 false

另见

System::operator==(const SmartPtr<X>&, const SmartPtr<Y>&) method

比较两个智能指针是否相等。

template<class X,class Y> bool System::operator==(const SmartPtr<X> &x, const SmartPtr<Y> &y)
Parameter描述
X第一个指针的被指对象类型。
Y第二个指针的被指对象类型。
ParameterType描述
xconst SmartPtr<X>&要比较的第一个指针。
yconst SmartPtr<Y>&要比较的第二个指针。

ReturnValue

如果指针匹配则为 true,否则为 false。

另见

System::operator==(const SmartPtr<X>&, const Y *) method

智能指针与普通 (C) 指针的相等性比较。

template<class X,class Y> std::enable_if<std::is_base_of<Object, Y>::value &&detail::has_no_operator_equal<X, Y>::value, bool>::type System::operator==(const SmartPtr<X> &x, const Y *y)
Parameter描述
X智能指针的类型。
Y普通指针的类型。
ParameterType描述
xconst SmartPtr<X>&用于比较的智能指针(左)。
yconst Y *指向要比较的指针(右)。

ReturnValue

如果指针匹配则为 true,否则为 false。

另见

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

确定通过对这些值应用 operator==() 来判断指定值是否等于指定的 Nullable 对象所表示的值。

template<typename T1,typename T2> std::enable_if<!IsNullable<T1>::value, bool>::type System::operator==(const T1 &some, const Nullable<T2> &other)
Parameter描述
T1第一个比较值的类型
T2表示第二个比较值的 Nullable 对象的底层类型
ParameterType描述
某些const T1&对将用作第一个比较值的值的常量引用
otherconst Nullable<T2>&Nullable 对象的常量引用,其表示的值将用作第二个比较值

ReturnValue

如果比较的两个值相等则为 true,否则为 false

另见

System::operator==(const X *, const SmartPtr<Y>&) method

智能指针与普通 (C) 指针的相等性比较。

template<class X,class Y> std::enable_if<std::is_base_of<Object, X>::value &&detail::has_no_operator_equal<X, Y>::value, bool>::type System::operator==(const X *x, const SmartPtr<Y> &y)
Parameter描述
X普通指针的类型。
Y智能指针的类型。
ParameterType描述
xconst X *指向要比较的指针(右)。
yconst SmartPtr<Y>&用于比较的智能指针(左)。

ReturnValue

如果指针匹配则为 true,否则为 false。

另见

System::operator==(std::nullptr_t, const DateTimeOffset&) method

bool System::operator==(std::nullptr_t, const DateTimeOffset &)

另见

System::operator==(std::nullptr_t, const Nullable<T>&) method

确定指定的 Nullable 对象是否表示等于 null 的值。

template<typename T> bool System::operator==(std::nullptr_t, const Nullable<T> &other)
ParameterType描述
otherstd::nullptr_t对要测试的 Nullable 对象的常量引用

ReturnValue

如果指定的对象表示 null 值则为 true,否则为 false

另见

System::operator==(std::nullptr_t, const String&) method

检查字符串是否为 null。

bool System::operator==(std::nullptr_t, const String &str)
ParameterType描述
strstd::nullptr_tString 待检查。

ReturnValue

如果字符串为 null 则为 true,否则为 false。

另见

System::operator==(std::nullptr_t, DateTime) method

bool System::operator==(std::nullptr_t, DateTime)

另见

System::operator==(std::nullptr_t, SmartPtr<X> const&) method

检查智能指针是否为 null。

template<class X> bool System::operator==(std::nullptr_t, SmartPtr<X> const &x)
Parameter描述
X指针所指向的类型。
ParameterType描述
xstd::nullptr_t要检查的指针。

ReturnValue

如果指针为 null 则为 true,否则为 false。

另见

System::operator==(std::nullptr_t, T const&) method

检查值类型对象(翻译后的 C# 结构体等)是否为 null。

template<class T> std::enable_if<!std::is_scalar<T>::value &&!std::is_pointer<T>::value &&!std::is_array<T>::value &&detail::has_method_is_null<T>::value, bool>::type System::operator==(std::nullptr_t, T const &x)
Parameter描述
T值类型。
ParameterType描述
xstd::nullptr_tObject 用于检查。

ReturnValue

如果对象为 null 则为 true,否则为 false。

另见

System::operator==(std::nullptr_t, TimeSpan) method

bool System::operator==(std::nullptr_t, TimeSpan)

另见

System::operator==(T&, const String&) method

String comparison.

template<class T,typename std::enable_if< IsStringPointer< T, char_t >::value >::type *> bool System::operator==(T &left, const String &right)
Parameter描述
TString 指针类型。
ParameterType描述
leftT&String 用于比较的指针。
rightconst String&String 用于比较。

ReturnValue

如果字符串匹配则为 true,否则为 false。

另见

System::operator==(T const&, std::nullptr_t) method

检查值类型对象(翻译后的 C# 结构体等)是否为 null。

template<class T> std::enable_if<!std::is_scalar<T>::value &&!std::is_pointer<T>::value &&!std::is_array<T>::value &&detail::has_method_is_null<T>::value, bool>::type System::operator==(T const &x, std::nullptr_t)
Parameter描述
T值类型。
ParameterType描述
xT const&Object 用于检查。

ReturnValue

如果对象为 null 则为 true,否则为 false。

另见