.net - How to organize classes in a C Sharp application? -
let's have visual studio project needs make use of binary search tree data structure. since .net not have built-in bst data structure have add classes myself (like this article). involve several classes: node, nodelist, binarytree, etc....so question better add these classes 1 .cs file i.e. nest them, or should each class it's own separate file? seems bit cleaner , possibly easier reuse classes if in 1 file, no?
i'm trying understand best practices organizing , designing projects. advice or direction point me appreciated.
i recommend using 1 file per type. there's no economy in restricting number of files , 1 file per type helps finding type in solution.
quite often, files organised in folders levels of organisation (the folders named along namespace lines these provide natural groupings of types) although not done.
Comments
Post a Comment