May 11, 2002 - Outside-the-Range Enum Values
![]() |
May 11, 2002 Outside-the-Range Enum Values Tips: May 2002
Yehuda Shiran, Ph.D.
|
enum tvNetworkType {
ABC,
CBS,
NBC,
FOX
}
The following line demonstrates a combination of the members NBC and FOX:
var tvCombination : tvNetworkType = tvNetworkType.NBC | tvNetworkType.FOX;
If you print the value of tvCombination above, you would get the value of 12 (the OR combination of 8 and 4).To learn more about JScript .NET, go to Column 108, JScript .NET, Part II: Major Features.



