A namespace cannot directly contain members such as fields or methods
-
Hi All, I am maintaining a Web Application, when I am trying to Publish it I am getting the following error "A namespace cannot directly contain members such as fields or methods" and I am positive that C# won't allow me to have methods directly under a namespace without class. The above error doesn't give me any information, hence I am researching online for help, please if anybody knows about this, can you please help me by a suggestion, a link or a code snippet. It helps me a lot. Thanks in advance.
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
-
Hi All, I am maintaining a Web Application, when I am trying to Publish it I am getting the following error "A namespace cannot directly contain members such as fields or methods" and I am positive that C# won't allow me to have methods directly under a namespace without class. The above error doesn't give me any information, hence I am researching online for help, please if anybody knows about this, can you please help me by a suggestion, a link or a code snippet. It helps me a lot. Thanks in advance.
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
See this link, here is your answer: [Resolved] A namespace does not directly contain members such as fields or methods - DotNetFunda.com[^]
hi