c# - Why does one class contained in a namespace not see another one contained in the same namespace? -


I am working on an application and I have participated in an unusual error that I have never seen before. I have two classes, which is a UserControl and a form, such an establishment:

  Namespace NC {Public partial board: UserControl {// stuff}} Namespace NC {partial square Board {// This is * .designer.cs file}} Name space NC {public partial class mainform: form {// normal form content}} namespace NC {partial class mainform {//} * .designer.cs file . A board has been added to it. }}  

This is included in the same project, so it should not be an issue. However, when I compile, I get it:

  Type name 'board' is not present in the "NC.NC" type  

I saw the form designer's file and found it:

  this.Board1 = new NC.Board ();  

I remove the name space and it works fine. Every time I use a form editor, it adds it again. I had no issue before this before. Is there any type of setting or something I can change?

Do you have a class named NC ? If you do, then you want to replace it with the name of something else. It looks like the compiler is searching the board inside the class named NC , not the name of the name NC < / Code> ...


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -