class - Organize instances of Classes C# -


i'm new c# , object oriented programming (mostly used c , assembly). question: there standard way of organizing instances of of custom class? have created class called "products" in separate class file , want instances of products in 1 location future programmer can jump straight code, locate "products" , add new ones in same location. wouldn't basic initiators like:

        products newproduct = new product(); 

but member data , such:

        products newproduct = new product();         newproduct.models.add("model#1");         newproduct.revisions.add("rev a"); 

which 30+ lines long. didn't want clutter main code. not sure if there clean way this. in advance.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -