Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DictionaryExtensions.cs
4using Waher.Events;
5
7{
11 public static class DictionaryExtensions
12 {
13 public static TValue? GetValueOrDefault<TKey, TValue>(
14 this IReadOnlyDictionary<TKey, TValue> Dict,
15 TKey Key,
16 TValue? Fallback = default(TValue?))
17 {
18 return Dict.TryGetValue(Key, out TValue? Value)
19 ? Value
20 : Fallback;
21 }
22 }
23}
An extensions class for the string class.