. ( : ) . , ( ). , .
, , ++. , # ..Net generics ++ - .
; . , -.
, , , . - . . . , , , .
, , T, , . () .
private static void myMethod(int obj, IDictionary dictionary)
{
}
private static void myMethod(int obj, ICollection collection)
{
}
new Dictionary new List , , .
private static void myMethodWithDictionary<T>(int obj) where T : IDictionary, new()
{
}
private static void myMethodWithCollection<T>(int obj) where T : ICollection, new()
{
}