String
This function retrieves the string pointer of a String value. It will fail with InvalidArgument if the type of the value is not String.
InvalidArgument
Requires an active script context.
public new string ToString() { IntPtr buffer; UIntPtr length; Native.ThrowIfError(Native.JsStringToPointer(this, out buffer, out length)); return Marshal.PtrToStringAuto(buffer, (int)length); }