I've a method where I pass list of object as the following:
public void BindGridView(int pageIndex, List<Users> lstUsers, GridView grd, Panel pl)
{
}
See in the above the list List<Users> is fixed, so I can pass it statically in a method. I'll use the same method to show data in a grid and planning to pass dynamically whenever there are other list of objects. In the above way, I've to declare all the list as below:
public void BindGridView(int pageIndex, List<Groups> lstGroups, GridView grd, Panel pl)
{
}
public void BindGridView(int pageIndex, List<GroupDetails> lstGroupDetails, GridView grd, Panel pl)
{
}
Is ther any way where I can declare it dynamically something like List<Dynamic>, say for utility purpose, so every time I can pass any list of object?