Skip to content

Commit 1e34bc6

Browse files
committed
Fix Directory.Remove on null values
1 parent 5b2792c commit 1e34bc6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Core.Common.Standard/Extension/DictionaryExtension.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static void Remove<TKey, TValue>(this IDictionary<TKey, TValue> dictionar
3232
{
3333
foreach (KeyValuePair<TKey, TValue> pair in dictionary)
3434
{
35-
if (pair.Value.Equals(value))
35+
if (Equals(pair.Value, value))
3636
{
3737
dictionary.Remove(pair.Key);
3838
return;
@@ -65,4 +65,4 @@ public static TValue GetOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> d
6565
return defaultValue;
6666
}
6767
}
68-
}
68+
}

Core.Common.Standard/KY.Core.Common.Standard.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<RootNamespace>KY.Core</RootNamespace>
66
<AssemblyName>KY.Core.Common</AssemblyName>
7-
<Version>4.31.0</Version>
7+
<Version>4.31.1</Version>
88
<Authors>KY-Programming</Authors>
99
<Company>KY-Programmingp</Company>
1010
<Product>KY.Core</Product>

0 commit comments

Comments
 (0)