The below code will verify if the object in list is dashboard, it will create the object of Dashboard class. The same can be applied on other classes too.
public static List<object> GetList()
{
List<object> lstobject = new List<object>();
lstobject.Add(new Dashboard());
return lstobject;
}
To get the object use the following block
List<object> lstObject = GetList();
Dashboard ds=null;
for (int i = 0; < lstObject.Count; i++)
{
if (lstObject[i] is Dashboard)
{
ds = (Dashboard)lstObject[i];
Console.WriteLine(ds.Key);
}
}
Hope this answer your question