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

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -