To create an empty sequence one uses the following
var empty = Enumerable.Empty<string> ();
Is there an equivalent for creating an empty dictionary as easily as this?
Back to year 2019, there is a way to achieve this, using:
ImmutableDictionary<TKey, TValue>.Empty
More info can be found here (last couple of posts): https://github.com/dotnet/corefx/issues/25023
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With