Use faster lenght comparison
authorMarek Safar <marek.safar@gmail.com>
Wed, 8 Aug 2012 10:12:45 +0000 (11:12 +0100)
committerMarek Safar <marek.safar@gmail.com>
Wed, 8 Aug 2012 10:26:00 +0000 (11:26 +0100)
mcs/class/corlib/System/Decimal.cs

index 6aecb441dbc7e7bea926de7b257d775d39b9394f..1bc48a9af7f787826928fcaed3b369a874126e3b 100644 (file)
@@ -225,10 +225,10 @@ namespace System
                {
                        if (bits == null) 
                        {
-                               throw new ArgumentNullException (Locale.GetText ("Bits is a null reference"));
+                               throw new ArgumentNullException (Locale.GetText ("bits is a null reference"));
                        }
 
-                       if (bits.GetLength(0) != 4) 
+                       if (bits.Length != 4) 
                        {
                                throw new ArgumentException (Locale.GetText ("bits does not contain four values"));
                        }