edit: I also tried
if(Session["object"] != null)
, , , Session . null, Session["object"] , "", , , , , null . , Session , , Session["object"] null:
if (Session != null)
{
if(Session["object"] == null)
{
Session["object"] = GetObject();
return Session["object"] as List<object>;
}
else
{
return Session["object"] as List<object>;
}
}
else
{
return null;
}