Remove redundant culture info from string concatenations
authorMarek Safar <marek.safar@gmail.com>
Tue, 5 Mar 2013 15:44:38 +0000 (16:44 +0100)
committerMarek Safar <marek.safar@gmail.com>
Tue, 5 Mar 2013 16:05:31 +0000 (17:05 +0100)
mcs/class/corlib/System.IO/FileNotFoundException.cs
mcs/class/corlib/System.Reflection/ExceptionHandlingClause.cs
mcs/class/corlib/System/Enum.cs

index 921a2e3dd57608d33ad8b3b3ad67026f7a4d3487..0f12284110c83639a6637b6ca13dd445ee45f1c1 100644 (file)
@@ -102,7 +102,7 @@ namespace System.IO {
                        get {
                                if (base.message == null) {
                                        if (fileName != null) {
-                                               string message = string.Format (CultureInfo.CurrentCulture,
+                                               string message = string.Format (
                                                        "Could not load file or assembly '{0}' or one of"
                                                        + " its dependencies. The system cannot find the"
                                                        + " file specified.", fileName);
index df887a54bff5bd0415b3f0476be24683a61b97b5..ed94d54b17a487493637cae25b9e2657b4f345ca 100644 (file)
@@ -136,7 +136,7 @@ namespace System.Reflection {
                        if (catch_type != null)
                                ret = String.Format ("{0}, CatchType={1}", ret, catch_type);
                        if (flags == ExceptionHandlingClauseOptions.Filter)
-                               ret = String.Format (CultureInfo.InvariantCulture, "{0}, FilterOffset={1}", ret, filter_offset);
+                               ret = String.Format ("{0}, FilterOffset={1}", ret, filter_offset);
                        return ret;
                }
        }
index f9c5b5781ec2dc785b35546eff4a77d4f1ba8ea0..9018c9fc0bd6f66d751ea787016da6f6a634d5b5 100644 (file)
@@ -952,12 +952,12 @@ namespace System
                        Type underlyingType = Enum.GetUnderlyingType (enumType);
                        if (vType.IsEnum) {
                                if (vType != enumType)
-                                       throw new ArgumentException (string.Format(CultureInfo.InvariantCulture,
+                                       throw new ArgumentException (string.Format(
                                                "Object must be the same type as the enum. The type" +
                                                " passed in was {0}; the enum type was {1}.",
                                                vType.FullName, enumType.FullName));
                        } else if (vType != underlyingType) {
-                               throw new ArgumentException (string.Format (CultureInfo.InvariantCulture,
+                               throw new ArgumentException (string.Format (
                                        "Enum underlying type and the object must be the same type" +
                                        " or object. Type passed in was {0}; the enum underlying" +
                                        " type was {1}.", vType.FullName, underlyingType.FullName));