INNER CODE UNIT · C#

ThrowIfNull

ArcadeMakerSources/ArcadeMaker · src/ArcadeMaker.Core/Extensions.cs:45

    public static IValue ThrowIfNull([NotNull] this IValue? value) => ThrowIfNull(values: value)[0]!;

    public static void Add<TKey, TValue>(this Dictionary<TKey, List<TValue>> dictionary, TKey key, TValue value)
    {
        if (dictionary.TryGetValue(key, out var ls))
            ls.Add(value);
        else
            dictionary.Add(key, [value]);
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…