共用方式為


PSDriveInfo.CompareTo Method

Definition

Overloads

CompareTo(PSDriveInfo)

Compares this instance to the specified drive.

CompareTo(Object)

Compares this instance to the specified object. The object must be a PSDriveInfo.

CompareTo(PSDriveInfo)

Compares this instance to the specified drive.

public:
 int CompareTo(System::Management::Automation::PSDriveInfo ^ drive);
public int CompareTo (System.Management.Automation.PSDriveInfo drive);
member this.CompareTo : System.Management.Automation.PSDriveInfo -> int
Public Function CompareTo (drive As PSDriveInfo) As Integer

Parameters

drive
PSDriveInfo

A PSDriveInfo object to compare.

Returns

A signed number indicating the relative values of this instance and object specified. Return Value: Less than zero Meaning: This instance is less than object. Return Value: Zero Meaning: This instance is equal to object. Return Value: Greater than zero Meaning: This instance is greater than object or object is a null reference.

Applies to

CompareTo(Object)

Compares this instance to the specified object. The object must be a PSDriveInfo.

public:
 virtual int CompareTo(System::Object ^ obj);
public:
 int CompareTo(Platform::Object ^ obj);
int CompareTo(winrt::Windows::Foundation::IInspectable const & obj);
public int CompareTo (object obj);
abstract member CompareTo : obj -> int
override this.CompareTo : obj -> int
Public Function CompareTo (obj As Object) As Integer

Parameters

obj
Object

An object to compare.

Returns

A signed number indicating the relative values of this instance and object specified.

Implements

Exceptions

If obj is not a PSDriveInfo instance.

Applies to