.WriteInt16 Method (IntPtr, Char)
Writes a character as a 16-bit integer value to unmanaged memory.
static member WriteInt16 :
val: char -> unit
Exception Condition AccessViolationException ptr is not a recognized format.
ptr is . a null reference ( Nothing in Visual Basic)
ptr is invalid. enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using WriteInt16 ) to a separate managed array before setting its element values. Marshal .Copy
Writing to unaligned memory locations is supported.
The following example demonstrates how to read and write to an unmanaged array using the
and ReadInt16 methods. WriteInt16
No code example is currently available or this language may not be supported.
Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
.NET Framework Client Profile
Supported in: 4, 3.5 SP1
Portable Class Library
Supported in: Portable Class Library
Supported in: Windows Phone 8.1