Code organization in C # projects

I have an interface:

public interface IMyObject
{
}

I have an abstract class:

public abstract class MyObject : IMyObject
{
}

And I have a class:

public class MyExtendedObject : MyObject
{
}

My project has many interfaces, theses, and concretes like this one. I wonder what is the best scenario for organizing code in a namespace (folders in a project). Should I put all related things in the same folder or create, for example, a Base namespace for abstract classes, an interface namespace for interfaces and another namespace for extended objects?

+3
source share
2 answers

The best way is subjective and depends on the project.

As a suggestion, I would say:

They move to separate folder interfaces and abstract classes, so they separate them from specific implementation classes.

+ Absrtacts 
     -> IMyObject.cs 
     -> MyObject.cs 

+ Concrete 
     -> MyExtendedObject.cs
+5

. ( - Agile Software Craftmanship) ,

Ivar Jacobson - : , Case.

, , , , . // , , , /namspace/assembly, / / ( , ).

+3

All Articles