Which is better: many class definitions in the same file or every class definition in a separate file?
- by Javed Akram
Which is better: many class definitions in same file or every class definition in separate file?
Examples:
1) Many classes in same file. Say, myManyClasses.cs:
namespace myPack
{
class myClass1()
{
}
class myClass2()
{
}
class myClass3()
{
}
.
.
.
}
2) Every class in separate file:
myClass1.cs
namespace myPack
{
class myClass1()
{
}
}
myClass2.cs
namespace myPack
{
class myClass2()
{
}
}
. . .