- s
- A string to copy into the system heap.
- index
- A int containing the start index into s to start marshaling.
- count
- A int containing the number of characters to marshal from s starting at index index.
- encoding
- A System.Text.Encoding specifying which encoding to marshal the string into.
A IntPtr containing a pointer on the system heap containing the marshaled string. If s is null, then IntPtr.Zero is returned.
Type Reason ArgumentNullException encoding is null. ArgumentOutOfRangeException count or index is less than zero.
-or-
index plus count is greater than the length of s.
NotSupportedException There was an error marshaling s into the specified encoding encoding. Mono.Unix.UnixIOException Unable to allocate enough memory for the marshaled string. [Mono.Unix.Native.Errno.ENOMEM]