Table of Contents

Class NSString

Namespace
CarinaStudio.MacOS.ObjectiveC
Assembly
CarinaStudio.AppBase.MacOS.dll

NSString.

public class NSString : NSObject, IDisposable, IEquatable<NSObject>, IComparable<NSString>, IEquatable<NSString>
Inheritance
NSString
Implements
Inherited Members
Extension Methods

Constructors

NSString()

Initialize new NSString instance.

public NSString()

NSString(string)

Initialize new NSString instance.

public NSString(string s)

Parameters

s string

Characters.

Properties

Length

Get number of characters.

public int Length { get; }

Property Value

int

Methods

CompareTo(NSString?)

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.

public int CompareTo(NSString? s)

Parameters

s NSString

Returns

int

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 other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Equals(NSString?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(NSString? s)

Parameters

s NSString

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

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

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(NSString?, NSString?)

Equality operator.

public static bool operator ==(NSString? l, NSString? r)

Parameters

l NSString
r NSString

Returns

bool

operator !=(NSString?, NSString?)

Inequality operator.

public static bool operator !=(NSString? l, NSString? r)

Parameters

l NSString
r NSString

Returns

bool