返回首页

GParkings:此消息的最可能的原因是你写的代码,应该在一类,委托,枚举,接口直接或结构的命名空间范围。这往往造成额外一个右大括号('}')造成你的范围去有点神经兮兮

采取以下内容:

namespace xxxx

{

    public class yyyy

    {

       public method zzzz()

       {

          //blah

       }

 

       public method qqqqq()

       {

       }

    }

}

如果我添加一个额外的}:

namespace xxxx

{

    public class yyyy

    {

       public method zzzz()

       {

          //blah

       } // this shouldnt be here

       }//this becomes the closing brace of the class rather than the method



       public method qqqqq() // this method is now outside the class!!

       {

       }

    }

}

回答

评论会员: 时间:2
|