From dc82eef8d57bd0ee63743cb03537d5e877f21b38 Mon Sep 17 00:00:00 2001 From: "Stephen A. Imhoff" Date: Wed, 26 Oct 2016 00:08:10 -0700 Subject: [PATCH] Correct parameter names. Commit migrated from https://github.com/dotnet/coreclr/commit/c7c324befe3b51ea85391564dd6794de15fad3d0 --- src/coreclr/src/mscorlib/src/System/Globalization/IdnMapping.cs | 2 +- src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs | 2 +- src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs | 2 +- src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/IdnMapping.cs b/src/coreclr/src/mscorlib/src/System/Globalization/IdnMapping.cs index 7b8221d..e6e313f 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/IdnMapping.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/IdnMapping.cs @@ -401,7 +401,7 @@ namespace System.Globalization // If its too far between dots then fail if (i - iLastDot > M_labelLimit + 1) throw new ArgumentException(Environment.GetResourceString( - "Argument_IdnBadLabelSize"), "Unicode"); + "Argument_IdnBadLabelSize"), nameof(unicode)); // If validating Std3, then char before dot can't be - char if (bUseStd3 && i > 0) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs index e9be890..6d3398c 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs @@ -1653,7 +1653,7 @@ namespace System.Reflection RuntimeType attributeRuntimeType = attributeType.UnderlyingSystemType as RuntimeType; if (attributeRuntimeType == null) - throw new ArgumentException(Environment.GetResourceString("Arg_MustBeType"),"caType"); + throw new ArgumentException(Environment.GetResourceString("Arg_MustBeType"),nameof(attributeType)); return CustomAttribute.IsDefined(this, attributeRuntimeType); } diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs index 89a3afd..3414a8d 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs @@ -1532,7 +1532,7 @@ namespace System.Reflection.Emit { RuntimeType attributeRuntimeType = attributeType.UnderlyingSystemType as RuntimeType; if (attributeRuntimeType == null) - throw new ArgumentException(Environment.GetResourceString("Arg_MustBeType"),"caType"); + throw new ArgumentException(Environment.GetResourceString("Arg_MustBeType"),nameof(attributeType)); return CustomAttribute.IsDefined(m_bakedRuntimeType, attributeRuntimeType, inherit); } diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs index 0486eb4..3ca34e1 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs @@ -1035,7 +1035,7 @@ namespace System.Runtime.InteropServices RuntimeType rt = structureType.UnderlyingSystemType as RuntimeType; if (rt == null) - throw new ArgumentException(Environment.GetResourceString("Arg_MustBeType"), "type"); + throw new ArgumentException(Environment.GetResourceString("Arg_MustBeType"), nameof(structureType)); StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller; -- 2.7.4