How to make a generic dictionary as function parameter?
c#, generics
Solution
You need to add the type parameter `T`:
public void f1<T>(Dictionary<string,T> d){
}
If you want the dictionary to contain values of any type then your only option is to use a `Dictionary<string, object>` and cast as appropriate.
Problem
My Case(I get compile error because T undefined): ``` public void f1(Dictionary<string,T> d){ } ``` How Can I solve the problem(I cant pass Object i have to pass original var type)? (I am using .net 4.5) Thanks