Use faster invariant conversion
authorMarek Safar <marek.safar@gmail.com>
Fri, 8 Mar 2013 14:18:48 +0000 (15:18 +0100)
committerMarek Safar <marek.safar@gmail.com>
Fri, 8 Mar 2013 14:47:44 +0000 (15:47 +0100)
mcs/class/System.Core/System.Linq.Expressions/Expression.cs

index bfe939a5cb0901bb47395d82de7a18de15840b68..8106c60f47d2607cc8ef501c40d95438fc5e6deb 100644 (file)
@@ -1333,7 +1333,7 @@ namespace System.Linq.Expressions {
                                throw new ArgumentNullException ("addMethod");
                        if (arguments == null)
                                throw new ArgumentNullException ("arguments");
-                       if (addMethod.Name.ToLower (CultureInfo.InvariantCulture) != "add")
+                       if (addMethod.Name.ToLowerInvariant () != "add")
                                throw new ArgumentException ("addMethod");
                        if (addMethod.IsStatic)
                                throw new ArgumentException ("addMethod must be an instance method", "addMethod");
@@ -1713,7 +1713,7 @@ namespace System.Linq.Expressions {
                        var inits = CheckListInit (newExpression, initializers);
 
                        if (addMethod != null) {
-                               if (addMethod.Name.ToLower (CultureInfo.InvariantCulture) != "add")
+                               if (addMethod.Name.ToLowerInvariant () != "add")
                                        throw new ArgumentException ("addMethod");
 
                                var parameters = addMethod.GetParameters ();