Symptoms
- You are seeing the following error in the console window:
error CS0101: The namespace `__' already contains a definition for `__'
Cause
CS0101 is caused when a namespace has duplicated identifiers. The example below has the same identifiers for both methods.
Error displayed in this example:
error CS0101: The namespace `ExampleNamespace' already contains a definition for `Method'
Resolution
In order to fix the CS0101, you will need to ensure that each identifier in your namespace is unique. Please see how we have fixed the example below:
This error can also be fixed by ensuring that all classes have a unique identifier. It is common to have duplicate scripts in a project.
More Information
https://msdn.microsoft.com/en-us/library/5b4kb4we(v=vs.90).aspx
Comments
0 comments
Article is closed for comments.