当前位置: 代码迷 >> ASP.NET >> 怪,该如何解决
  详细解决方案

怪,该如何解决

热度:4314   发布时间:2013-02-25 00:00:00.0

写成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才怪
------解决方案--------------------------------------------------------
死循环
  相关解决方案