PhillipsJP PhillipsJP - 1 year ago 86
C# Question

Object oriented c#

I have a class called Promotion (model class). I want a promotion to have a type called Category where Category is its own model class I'm assuming where I would define all the types of categories such as fast food foot wear jewelry and so on. I'm not quite sure of how to go about this though so for example, my class called category is already a set thing but my class promotion is something where before I create it I need to set it with a category with the viable category options. thank you!

Answer Source

why don't you create a property called Categories of type Category in the Promotion?

enum Algorithms

class Process
   public Algorithm algorithms{get;}

For the detailed difference please read the answer from this SO answer

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download