summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Globalization/SortKey.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Globalization/SortKey.cs')
-rw-r--r--src/mscorlib/src/System/Globalization/SortKey.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mscorlib/src/System/Globalization/SortKey.cs b/src/mscorlib/src/System/Globalization/SortKey.cs
index e3308dc4f8..9c35f485e5 100644
--- a/src/mscorlib/src/System/Globalization/SortKey.cs
+++ b/src/mscorlib/src/System/Globalization/SortKey.cs
@@ -16,6 +16,7 @@ namespace System.Globalization {
using System;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
+ using System.Diagnostics;
using System.Diagnostics.Contracts;
[System.Runtime.InteropServices.ComVisible(true)]
@@ -119,15 +120,15 @@ namespace System.Globalization {
public static int Compare(SortKey sortkey1, SortKey sortkey2) {
if (sortkey1==null || sortkey2==null) {
- throw new ArgumentNullException((sortkey1==null ? "sortkey1": "sortkey2"));
+ throw new ArgumentNullException((sortkey1==null ? nameof(sortkey1): nameof(sortkey2)));
}
Contract.EndContractBlock();
byte[] key1Data = sortkey1.m_KeyData;
byte[] key2Data = sortkey2.m_KeyData;
- Contract.Assert(key1Data!=null, "key1Data!=null");
- Contract.Assert(key2Data!=null, "key2Data!=null");
+ Debug.Assert(key1Data!=null, "key1Data!=null");
+ Debug.Assert(key2Data!=null, "key2Data!=null");
if (key1Data.Length == 0) {
if (key2Data.Length == 0) {