我有一个类似这样的.net应用程序(c#)
public partial class _Default : System.Web.UI.Page
{
#region initial variables setup
private static exam theExam;
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
string userid = Request.Querystring["user"].ToString();
theExam = new exam(userid, "some values");
}
}
// rest of code.
Run Code Online (Sandbox Code Playgroud)
现在我的问题是,如果用户105登录了一个考试实例,那么创建了一个实例,并将其分配给顶部的静态声明.如果用户204然后从另一台计算机登录,那么即使在用户105的计算机上,顶部的静态对象是否仍然获得204的值?