Class Design Question.
-
Hello all. I am trying to decide if it's better to have all my classes in one .cs file within my project(for instance 'MyClasses') and then just put all my classes inside that file. This would result in code like this. MyClasses.MyClass x = new MyClasses.MyClass(): The alternative is obviously putting each individual class in it's own .cs file under the project. This would enable me to simply do MyClass x = new MyClass(); What is the advantage/disadvantage of doing this both ways? I do not want to build the classes in a separate project and import the dll. So I'm really just wondering about these 2 different ways of building the classes in my project.
-
Hello all. I am trying to decide if it's better to have all my classes in one .cs file within my project(for instance 'MyClasses') and then just put all my classes inside that file. This would result in code like this. MyClasses.MyClass x = new MyClasses.MyClass(): The alternative is obviously putting each individual class in it's own .cs file under the project. This would enable me to simply do MyClass x = new MyClass(); What is the advantage/disadvantage of doing this both ways? I do not want to build the classes in a separate project and import the dll. So I'm really just wondering about these 2 different ways of building the classes in my project.
-
Hello all. I am trying to decide if it's better to have all my classes in one .cs file within my project(for instance 'MyClasses') and then just put all my classes inside that file. This would result in code like this. MyClasses.MyClass x = new MyClasses.MyClass(): The alternative is obviously putting each individual class in it's own .cs file under the project. This would enable me to simply do MyClass x = new MyClass(); What is the advantage/disadvantage of doing this both ways? I do not want to build the classes in a separate project and import the dll. So I'm really just wondering about these 2 different ways of building the classes in my project.
-
Hello all. I am trying to decide if it's better to have all my classes in one .cs file within my project(for instance 'MyClasses') and then just put all my classes inside that file. This would result in code like this. MyClasses.MyClass x = new MyClasses.MyClass(): The alternative is obviously putting each individual class in it's own .cs file under the project. This would enable me to simply do MyClass x = new MyClass(); What is the advantage/disadvantage of doing this both ways? I do not want to build the classes in a separate project and import the dll. So I'm really just wondering about these 2 different ways of building the classes in my project.