Files
FSI.BT.IR.Tools/FSI.BT.Tools/Config.Net/Core/Extensions.cs
Maier Stephan SI f3f89b94f5 Sicherung gnaz neu
2023-02-15 00:55:50 +01:00

17 lines
410 B
C#

using System.Collections.Generic;
namespace Config.Net.Core
{
static class Extensions
{
public static TValue? GetValueOrDefaultInternal<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
where TKey: notnull
where TValue: class
{
if (!dictionary.TryGetValue(key, out TValue? value)) return default(TValue);
return value;
}
}
}