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)
参数描述
CharsString 字面量类型。
参数类型描述
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)
参数类型描述
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)
参数类型描述
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)
参数描述
X第一个指针的被指对象类型。
Y第二个指针的被指对象类型。
参数类型描述
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)
参数描述
X智能指针的类型。
Y普通指针的类型。
参数类型描述
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)
参数描述
T1第一个比较值的类型
T2表示第二个比较值的 Nullable 对象的底层类型
参数类型描述
一些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)
参数描述
X普通指针的类型。
Y智能指针的类型。
参数类型描述
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)
参数类型描述
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)
参数类型描述
strstd::nullptr_t待检查的 String

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)
参数描述
X指针所指向的类型。
参数类型描述
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)
参数描述
T值类型。
参数类型描述
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)
参数描述
TString 指针类型。
参数类型描述
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)
参数描述
T值类型。
参数类型描述
xT const&Object 用于检查。

ReturnValue

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

另见