+#if NET_2_0
+ if (buffer == null)
+ buffer = EncoderFallback.CreateFallbackBuffer ();
+ if (Char.IsSurrogate (ch) && count > 1 &&
+ Char.IsSurrogate (chars [charIndex]))
+ buffer.Fallback (ch, chars [charIndex], charIndex++ - 1);
+ else
+ buffer.Fallback (ch, charIndex - 1);
+ if (fallback_chars == null || fallback_chars.Length < buffer.Remaining)
+ fallback_chars = new char [buffer.Remaining];
+ for (int i = 0; i < fallback_chars.Length; i++)
+ fallback_chars [i] = buffer.GetNextChar ();
+ byteIndex += GetBytes (fallback_chars, 0,
+ fallback_chars.Length, bytes, byteIndex,
+ ref buffer, ref fallback_chars);
+#else