Files
ListServer/DictionaryExtensions.cs
Nekura b9d7b1c9f7 Init
2025-07-25 18:39:48 +02:00

13 lines
400 B
C#

// DictionaryExtensions.cs
using System.Collections.Generic;
namespace FreelancerListServer
{
public static class DictionaryExtensions
{
public static TValue GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue)
{
return dictionary.TryGetValue(key, out TValue value) ? value : defaultValue;
}
}
}