Merge pull request #409 from Alkarex/patch-1
[mono.git] / mcs / class / corlib / System.Text / UTF32Encoding.cs
index 8e27f2ade65219106c57fd3c01e08973a946e8d3..16413e8ad578a703c747aabed5bd206b6c0e0c2c 100644 (file)
@@ -31,8 +31,6 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#if NET_2_0
-
 namespace System.Text
 {
 
@@ -316,9 +314,9 @@ public sealed class UTF32Encoding : Encoding
                                preamble[1] = (byte)0xFE;
                        }
                        return preamble;
-               } else {
-                       return new byte [0];
                }
+               
+               return EmptyArray<byte>.Value;
        }
 
        // Determine if this object is equal to another.
@@ -469,7 +467,6 @@ public sealed class UTF32Encoding : Encoding
 
        } // class UTF32Decoder
        
-#if NET_2_0
        [CLSCompliantAttribute(false)]
        public unsafe override int GetByteCount (char *chars, int count)
        {
@@ -477,14 +474,7 @@ public sealed class UTF32Encoding : Encoding
                        throw new ArgumentNullException ("chars");
                return count * 4;
        }
-#else
-       public override byte [] GetBytes (String s)
-       {
-               return base.GetBytes (s);
-       }
-#endif
 
-#if NET_2_0
        // a bunch of practically missing implementations (but should just work)
 
        public override int GetByteCount (string s)
@@ -524,10 +514,6 @@ public sealed class UTF32Encoding : Encoding
        {
                return base.GetEncoder ();
        }
-#endif
-
 }; // class UTF32Encoding
 
 }; // namespace System.Text
-
-#endif