Edit

Share via


OSPlatform.Equals Method

Definition

Determines whether two OSPlatform instances are equal.

Overloads

Equals(Object)

Determines whether the current OSPlatform instance is equal to the specified object.

Equals(OSPlatform)

Determines whether the current instance and the specified OSPlatform instance are equal.

Equals(Object)

Source:
OSPlatform.cs
Source:
OSPlatform.cs
Source:
OSPlatform.cs

Determines whether the current OSPlatform instance is equal to the specified object.

public:
 override bool Equals(System::Object ^ obj);
public override bool Equals (object? obj);
public override bool Equals (object obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean

Parameters

obj
Object

true if obj is a OSPlatform instance and its name is the same as the current object; otherwise, false.

Returns

true if obj is a OSPlatform instance and its name is the same as the current object.

Remarks

The name of an OSPlatform object is the osPlatform string passed to the Create method. The names of the OSPlatform objects returned by the static OSPlatform properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same.

Applies to

Equals(OSPlatform)

Source:
OSPlatform.cs
Source:
OSPlatform.cs
Source:
OSPlatform.cs

Determines whether the current instance and the specified OSPlatform instance are equal.

public:
 virtual bool Equals(System::Runtime::InteropServices::OSPlatform other);
public bool Equals (System.Runtime.InteropServices.OSPlatform other);
override this.Equals : System.Runtime.InteropServices.OSPlatform -> bool
Public Function Equals (other As OSPlatform) As Boolean

Parameters

other
OSPlatform

The object to compare with the current instance.

Returns

true if the current instance and other are equal; otherwise, false.

Implements

Remarks

Two OSPlatform instances are equal if they have the same name. The name of an OSPlatform object is the osPlatform string passed to the Create method. The names of the OSPlatform objects returned by the static OSPlatform properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same.

Applies to