英語で読む 編集

次の方法で共有


IntPtr.CompareTo Method

Definition

Overloads

CompareTo(IntPtr)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

CompareTo(Object)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

CompareTo(IntPtr)

Source:
IntPtr.cs
Source:
IntPtr.cs
Source:
IntPtr.cs

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

C#
public int CompareTo(IntPtr value);

Parameters

value
IntPtr

A signed native integer to compare.

Returns

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes value in the sort order.
Zero This instance occurs in the same position in the sort order as value.
Greater than zero This instance follows value in the sort order.

Implements

Applies to

.NET 10 およびその他のバージョン
製品 バージョン
.NET 5, 6, 7, 8, 9, 10

CompareTo(Object)

Source:
IntPtr.cs
Source:
IntPtr.cs
Source:
IntPtr.cs

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

C#
public int CompareTo(object? value);

Parameters

value
Object

An object to compare, or null.

Returns

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes value in the sort order.
Zero This instance occurs in the same position in the sort order as value.
Greater than zero This instance follows value in the sort order.

Implements

Applies to

.NET 10 およびその他のバージョン
製品 バージョン
.NET 5, 6, 7, 8, 9, 10