public void Method(Dictionary<any datatype, any datatype> dict)
{
foreach (var o in dict)
{
Console.WriteLine(o);
}
}
and then when we need to call the Method, we can put any kind of Dictionary there. e.g. Method(new Dictionary< int,string >()); Method(new Dictionary< string, string>()); Can we do that? Also, can we output a dictionary for any kind of data type?