A
Author
I am studying Scott Allen's Workflow sample code for an order
processing application. Below is an enum he defines:
[Flags]
public enum OrderTransitions
{
None = 0,
CanOpen = 1,
CanProcess = 2,
CanComplete = 4,
CanCancel = 8
}
I am curious about the int values he assigned to the enum. There must
be a reason that he wants to use values that are 2^n instead of using
0, 1, 2, 3, 4.
Any hint? Thanks a lot.
processing application. Below is an enum he defines:
[Flags]
public enum OrderTransitions
{
None = 0,
CanOpen = 1,
CanProcess = 2,
CanComplete = 4,
CanCancel = 8
}
I am curious about the int values he assigned to the enum. There must
be a reason that he wants to use values that are 2^n instead of using
0, 1, 2, 3, 4.
Any hint? Thanks a lot.