Is it possible to have a generic constraint which is an unbounded generic type?
For example:
public T DoSomething<T>(T dictionary) where T : IDictionary<,>
{
...
}
Edit: Just to explain the context, I want to constrain the usage of the method to an IDictionary, but for the method itself it does not matter exactly what TKey and TValue are.
This isn't possible, you need to specify the type parameters: