StringWrapper

public class StringWrapper : IDisposable
Represents a wrapper to an unmanaged OpenNurbs string.

Wraps a C++ ON_wString*.

Constructors

StringWrapper

#Since v5.0
public StringWrapper()
Initializes a new empty unmanaged string (ON_wString*).

StringWrapper

#Since v5.0
public StringWrapper(string s)
Initializes a new unmanaged string with an initial value. The string s can be null.
s (string)The initial value, or null.

Finalizer

~StringWrapper

#
~StringWrapper()
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().

Properties

ConstPointer

#Since v5.0
public nint ConstPointer { get; }
Gets the constant pointer (constant ON_wString*).
The constant pointer.

NonConstPointer

#Since v5.0
public nint NonConstPointer { get; }
Gets the non-constant pointer (ON_wString*).
The non-constant pointer.

Methods

Dispose

#Since v5.0
public void Dispose()
Actively reclaims unmanaged resources that this instance uses.

GetStringFromPointer

#Since v5.0
public static string GetStringFromPointer(nint pConstON_wString)
Get string from an ON_wString*
pConstON_wString (nint)

SetString

#Since v5.0
public void SetString(string s)
Set contents of this string.
s (string)The new string.

SetStringOnPointer

#Since v5.0
public static void SetStringOnPointer(nint pON_wString, string s)
Set contents of an ON_wString*
pON_wString (nint)
s (string)

ToString

#
public override string ToString()
Returns the string contents of this wrapper.
A managed string.
Object.ToString