+ unsafe {
+ fixed (char* p = s) {
+ fixed (byte* b = bytes) {
+ return GetBytes (p + charIndex, charCount, b + byteIndex, bytes.Length - byteIndex);
+ }
+ }
+ }
+ }
+
+ public unsafe override int GetBytes(char* chars, int charCount, byte* bytes, int byteCount)
+ {
+ if (bytes == null || chars == null)
+ throw new ArgumentNullException (bytes == null ? "bytes" : "chars");
+
+ if (charCount < 0 || byteCount < 0)
+ throw new ArgumentOutOfRangeException (charCount < 0 ? "charCount" : "byteCount");
+