Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Not Found property
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams committed Sep 18, 2017
1 parent 212956f commit 9118ff4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/mscorlib/src/System/Collections/Generic/Dictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ private ref Entry FindEntryDefaultComparer(TKey key, out bool found)
}

found = false;
return ref s_nullEntry;
return ref NotFound;
}

private ref Entry FindEntryCustomComparer(TKey key, IEqualityComparer<TKey> comparer, out bool found)
Expand All @@ -416,7 +416,13 @@ private ref Entry FindEntryCustomComparer(TKey key, IEqualityComparer<TKey> comp
}

found = false;
return ref s_nullEntry;
return ref NotFound;
}

private static ref Entry NotFound
{
[MethodImpl(MethodImplOptions.NoInlining)]
get => ref s_nullEntry;
}

private int[] Initialize(int capacity)
Expand Down

0 comments on commit 9118ff4

Please sign in to comment.