alex
alex

Reputation: 1350

The type 'X' does not exist in the type 'X.X' error

The project structure is here.

How can I modify the project to compile?

What are the best practices in organizing a project structure?

Upvotes: 0

Views: 127

Answers (1)

Jon Skeet
Jon Skeet

Reputation: 1500515

Just don't name a type the same as its namespace. That's always a bad idea. You can get round the issues in various ways, but it's ugly in many cases. Renaming either the type or the namespace would be much better.

In this particular case, you can just change your code to:

Application.Run(new NeuralNetwork());

... and that will refer to the type. But don't just do that - rename the type or namespace instead :)

Eric Lippert has a four part blog post series on the topic:

Upvotes: 1

Related Questions