08 2011 档案
Dictionary SortedList HashSet List用法
摘要:View Code using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { #region Dictionary var dic ... 阅读全文
posted @ 2011-08-31 16:06 freexiaoyu 阅读(304) 评论(0) 推荐(0)
asp.net 页面static变量问题
摘要:下面引用 http://www.cnblogs.com/meyer/archive/2004/04/27/7846.html在C#中,static变量表示该变量属于类,而不是类的实例。可以说是该类的所有实例共享一个static变量。asp.net的页面就是一个类,我们访问一个页面。就会在服务器上实例化一个该类的实例,来响应我们的请求。“所有实例共享一个static变量” 这就意味着,所有的客户端访问到的asp.net页面中static变量都是同一个变量。由于我们每次访问asp.net页面都是一个全新的对象,而不是我们上一次访问的对象。所以上次页面访问时我们对页面中变量的改动都没有保留。遇到这个 阅读全文
posted @ 2011-08-23 23:16 freexiaoyu 阅读(551) 评论(0) 推荐(0)