Reputation: 29
I have a question regarding C# inheritance management.
Should I write both classes (base and derived) under one namespace or should they be in different namespaces?
Upvotes: 1
Views: 102
Reputation: 62248
Namespace
is nothing else then a part of a complete name of your type.
So to choose either put them into the same namepsace
or not, is not something that anyone could possibly know here. Choose them according the your code architecture.
Immagine being other developer and look on your types. Is it intuitive that both of them into the same namespace, or not ?
Hope this helps.
Upvotes: 3
Reputation: 8949
They don't need to be in the same namespace. You might even put them in different assemblies if the project architecture is like that.
Upvotes: 1