daha yeni yeni başladığım için çok iyi derecede bilmiyorum session tanımlayacağım bir sınıf derken nasıl bir sınıf kodu yazacağım hakkında bir ip ucu veya bir makale varmıdır ?


bir kod buldum bunun gibi birşeymidir acaba ?

public class MySession
{
// private constructor
private MySession() { }

// Gets the current session.
public static MySession Current
{
get
{
MySession session =
(MySession)HttpContext.Current.Session["__MySession__"];
if (session == null)
{
session = new MySession();
HttpContext.Current.Session["__MySession__"] = session;
}
return session;
}
}

// **** add your session properties here, e.g like this:
public string Property1 { get; set; }
public DateTime MyDate { get; set; }
public int LoginId { get; set; }
}
yeni mesaj atmak istemedim düzenle yaptım o yüzden.