MonobjcMonobjc Documented Class Library
NSSize Structure

Represents a two-dimensional size.

Normally, the values of width and height are non-negative. The functions that create an NSSize structure do not prevent you from setting a negative value for these attributes. If the value of width or height is negative, however, the behavior of some methods may be undefined.

Declaration Syntax
C#Visual BasicVisual C++
public struct NSSize : IEquatable<NSSize>
Public Structure NSSize _
	Implements IEquatable(Of NSSize)
public value class NSSize : IEquatable<NSSize>
All MembersConstructorsMethodsFields

NSSize(Single, Single)
Initializes a new instance of the NSSize class.

Add(NSSize, NSSize)
Returns the sum of the two sizes instances.

Addition(NSSize, NSSize)
Implements the operator +.

Converts a NSSize instance to a [!:CGSize]

Divide(NSSize, Single)
Returns the result of the division of the size instance by the given factor.

Division(NSSize, Single)
Implements the operator /.

Equality(NSSize, NSSize)
Implements the operator ==.

Equalses the specified ns size.

Indicates whether this instance and a specified object are equal.
(Overrides ValueType.Equals(Object).)
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Returns the hash code for this instance.
(Overrides ValueType.GetHashCode()()()().)
Gets the Type of the current instance.
(Inherited from Object.)
The height.

Inequality(NSSize, NSSize)
Implements the operator !=.

Creates a shallow copy of the current Object.
(Inherited from Object.)
Multiply(NSSize, Single)
Returns the product of the size instance by the given factor.

Multiply(NSSize, Single)
Implements the operator *.

NSEqualSizes(NSSize, NSSize)
Tests two size values for equality.

NSMakeSize(Single, Single)
Creates a new NSSize from the specified values.

Converts a [!:CGSize] instance to a NSSize

Returns an NSSize from a text-based representation.

Returns a string representation of a size.

An NSSize with its width and height set to 0.

Substract(NSSize, NSSize)
Returns the difference of the two sizes instances.

Subtraction(NSSize, NSSize)
Implements the operator -.

Returns the a string representation of this instance.
(Overrides ValueType.ToString()()()().)
The width.

Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)