Assuming that "option" is an enum, use the "Or" operator. The enum will have to be defined in a manner which makes it suitable for this type of operation. For example, this would be suitable:
[Flags]
public enum SomeOptions
{
FirstOption = 1,
SecondOption = 2,
ThirdOption = 4,
FourthOption = 8,
FifthOption = 16
}
This would not be suitable:
public enum SomeOptions
{
FirstOption = 1,
SecondOption = 2,
ThirdOption = 3,
FourthOption = 4,
FifthOption = 5
}
Using the "Flags" attribute just tells the compiler that you will be using this enum in the scenario you have described (combining various options). By doubling the numbers (1, 2, 4, 8, ...), you ensure that using the OR operator on them will produce valid results. The reason for that is how numbers are stored in binary. 1 is stored as "0001", 2 as "0010", 4 as "0100", 8 as "1000", and so on. If you combine 1 and 4, you get "0101" (i.e., the binary digits don't overlap).