Yes, you can store any object (I assume you are using ASP.NET with default settings, which is in-process session state):
Session["test"] = myList;
You should cast it back to the original type for use:
var list = (List<int>)Session["test"];
// list.Add(something);
As Richard points out, you should take extra care if you are using other session state modes (e.g. SQL Server) that require objects to be serializable.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…