日期:2014-05-18  浏览次数:20447 次


写成SessionUtil.IsNull(SessionUtil.Session_Account)
就报 "System.StackOverflowException "的错误

写成SessionUtil.IsNull( "Account ")就没事
搞不懂啊????????

  public   static   bool   IsNull(string   name)
                {
                        if   (HttpContext.Current.Session[name]   ==   null)
                                return   true;
                        else
                                return   false;
                }

  private   const   string   SESSIONNAME_ACCOUNT   =   "Account ";

                public   static   string   Session_Account
                {
                        get   {   return   Session_Account;   }
                }

------解决方案--------------------
public static string Session_Account
{
get { return Session_Account; }
}

死循环 不overflow才怪
------解决方案--------------------
死循环