public static IDictionary<TKey, TVal> Insert(this IDictionary<TKey, TVal> dict, TKey key, TVal value)
{
dict.Add(key, value);
return dict;
}
I get my favorite red squiggly line under the TKey and TVal with the “Type or namespace cannot be found” error. As placeholders for types, I wouldn’t think this would happen… where am I screwing up?
You need to specify the type parameters to the method as well:
to make it a generic method.