Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ViIvanov/bcf8524c00916a37453b to your computer and use it in GitHub Desktop.
Save ViIvanov/bcf8524c00916a37453b to your computer and use it in GitHub Desktop.
using System.Collections.Generic;
// ReSharper disable once CheckNamespace
class MultiDictionary<TKey, TValue> : Dictionary<TKey, IList<TValue>>
{
public void Add(TKey key, params TValue[] values) { }
}
static class Program
{
static void Main() {
// ReSharper disable once UnusedVariable
var dict = new MultiDictionary<int, string> {
{ 1, "1", "One", },
// ^ See trailing comma inside brackets.
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment