Reputation: 833
I am building this SportStore app from a book example. Everything works perfectly. But when I look into the code, I realize that the namespace doesn't match the folder path. Then why Visual Studio can still compile and run them example? (as you notice, the difference is the letter "s" in "SportsStore"
Upvotes: 0
Views: 300
Reputation:
Folder and filenames are ignored by the compiler. All it cares about is the contents of the files. .Net doesn't require folders to match namespaces. Class names are not required to match the filenames, either.
Upvotes: 1