I want to return Table List with there class object and this call also generic, I don't want to use any Non-Strong type List like ArrayList on any other.
public List<T> GetTables()
{
var tbls = new List<T>();
tbls.Add(new Table<Table1>() { Name = "Table1"});
tbls.Add(new Table<Table2>() { Name = "Table2"});
tbls.Add(new Table<Table3>() { Name = "Table3"});
return tbls;
}
in above Method, Table1, Table2, and any type table class object... There classes has no any based class, These classes use to Set of table properties with custom format.
I want to return it.
Please help me if anyone have any idea.
thank you.
List<CommonBaseType>then the above is not possible how you want it. Substitute "interface" for "base type" in my prior sentence if we're talking about interfaces.