c# - Build a list of options based on an array -
how go programmatic making list? need combinations
string[] list = { "open", "completed","rescheduled", "canceled", "started", "customer notified", "do not move", "needs confirmation" };
this list first 15 there on 200+ combinations.
- open
- completed
- open, completed
- rescheduled
- open, rescheduled
- completed, rescheduled
- open, completed, rescheduled
- canceled
- open, canceled
- completed canceled
- open, completed, canceled
- rescheduled, canceled
- open, rescheduled, canceled
- completed, rescheduled, canceled
- open, completed, rescheduled, canceled
don't use lists it. try use enum , attribute flags like:
[flags] public enum status { open = 0x01, completed = 0x02, rescheduled = 0x04, canceled = 0x08, started = 0x10, customer_notified = 0x20, do_not_move = 0x40, needs_confirmation = 0x80 }
then can set few statuses @ once field like
var status = status.open | status.completed
Comments
Post a Comment