Share via


CFString Class

Definition

String class used by C-only Cocoa APIs.

public class CFString : CoreFoundation.NativeObject
type CFString = class
    inherit NativeObject
Inheritance
Derived

Remarks

Use this class for creating strings that must be passed to methods in the low-level CoreGraphics API.

Constructors

Name Description
CFString()
CFString(String)

Creates a CFString from a C# string.

Properties

Name Description
Handle (Inherited from DisposableObject)
Item[IntPtr]
Length

String length.

Owns (Inherited from DisposableObject)

Methods

Name Description
ClearHandle() (Inherited from DisposableObject)
CreateNative(String, Boolean)

Creates a CFString from the C# string and returns a pointer to it.

CreateNative(String, Int32, Int32, Boolean)

Creates a CFString from the C# string and returns a pointer to it.

CreateNative(String)

Creates a CFString from the C# string and returns a pointer to it.

Dispose() (Inherited from DisposableObject)
Dispose(Boolean) (Inherited from NativeObject)
Equals(Object) (Inherited from DisposableObject)
FromHandle(NativeHandle, Boolean)

Utility method that returns a string from a pointer that points to an Objective-C NSString or CFString object.

FromHandle(NativeHandle)

Utility method that returns a string from a pointer that points to an Objective-C NSString or CFString object.

GetCheckedHandle() (Inherited from DisposableObject)
GetHashCode() (Inherited from DisposableObject)
GetTypeID()

Type identifier for the CoreFoundation.CFString type.

InitializeHandle(NativeHandle) (Inherited from DisposableObject)
Release() (Inherited from NativeObject)
ReleaseNative(NativeHandle)

Releases a native Objective-C string.

Retain() (Inherited from NativeObject)
ToString()

Operators

Name Description
Implicit(CFString to String)
Implicit(String to CFString)

Extension Methods

Name Description
GetHandle(INativeObject)
GetNonNullHandle(INativeObject, String)

Applies to