首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

怪,该如何解决

2012-03-29 
怪写成SessionUtil.IsNull(SessionUtil.Session_Account)就报 System.StackOverflowException 的错误写


写成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才怪
[解决办法]
死循环

热点排行