title: How can I use custom-attributes in C# to replace switches in switches?
body: <p>I have a factory method that returns the correct sub class depending on three enum values.
  One way to do is, would be to use switches in switches in switches. Obviously, I don't like that option very much.</p>
  
  <p>I thought that another option would be to use attributes in C#. Every sub class would have an attribute with that 3 enum values and in the factory I would only have to get the class that has the same enum values corresponding to the enum values i have in the factory.</p>
  
  <p>However, I am quite new to attributes and I did not find any suitable solution in the web. If anyone, could just give me some hints or some lines of code, I really would appreciate that!</p>