Mac Guides | Samples

MonoMac.Foundation.NSString Class

The Foundation String class.

See Also: NSString

Syntax

[MonoMac.Foundation.Register("NSString", true)]
public class NSString : NSObject

Requirements

Namespace: MonoMac.Foundation
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0

The members of MonoMac.Foundation.NSString are listed below.

See Also: NSObject

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
A constructor that initializes the object from the data stored in the unarchiver object.
Constructor to call on derived classes when the derived class has an [Export] constructor.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.
Creates an NSString from a C# string.

Public Properties

[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
default property
Item(Int32)Char.
[read-only]
LengthInt32.

Public Methods

_characterAtIndex(Int32) : Char
BoundingRectWithSize(SizeF, NSStringDrawingOptions, NSDictionary) : RectangleF
Capitalize(NSLocale) : String
Compare(NSString) : NSComparisonResult
Compare(NSString, NSStringCompareOptions) : NSComparisonResult
Compare(NSString, NSStringCompareOptions, NSRange) : NSComparisonResult
Compare(NSString, NSStringCompareOptions, NSRange, NSLocale) : NSComparisonResult
static
CreateNative(String) : IntPtr
Creates an Objective-C NSString from the C# string and returns a pointer to it.
DataUsingEncoding(NSStringEncoding) : NSData
DataUsingEncoding(NSStringEncoding, Boolean) : NSData
DrawString(PointF, NSDictionary)
DrawString(RectangleF, NSDictionary)
DrawString(RectangleF, NSStringDrawingOptions, NSDictionary)
Encode(NSStringEncoding) : NSData
Encode(NSStringEncoding, Boolean) : NSData
override
Equals(Object) : Boolean
static
Equals(NSString, NSString) : Boolean
static
FromData(NSData, NSStringEncoding) : NSString
Creates an NSString from an NSData source.
static
FromHandle(IntPtr) : String
Utility method that returns a string from a pointer that points to an Objective-C NSString object.
override
GetHashCode() : Int32
Generates a hash code for the current instance.
static
ReleaseNative(IntPtr)
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.
Replace(NSRange, NSString) : NSString
StringSize(NSDictionary) : SizeF
ToLower(NSLocale) : String
override
ToString() : String
Returns a string representation of the value of the current instance.
ToUpper(NSLocale) : String

Public Operators

static
Equality(NSString, NSString)
static
Inequality(NSString, NSString)
static
Conversion to MonoMac.Foundation.NSString(Explicit)
static
Conversion to System.String(Implicit)Converts the NSString to a CIL/C# string.