Im want to make method more user comfortable in method with Generic T
public class foo_Class
{
public My_Class(object ob, string foo)
{
this.ob = ob;
this.foo = foo;
}
public object ob { get; set; }
public string foo { get; set; }
}
so when im adding foo_Class to Dictionary for example, we have to write like this.
Dictionary<string, foo_Class> foo_Dictionary = new Dictionary<string, foo_Class>();
foo_Dictionary.Add("foo", new foo_Class(Value1, "fo"));
but i just want to write like this using override,
Dictionary<string, My_class> My_Dictionary = new Dictionary<string, My_class>();
My_Dictionary.Add("foo", Value1, "fo");
...
So, help me to solve this prob.
Thx.