|
May 10, 2002 Setting the Enum Values Tips: May 2002
Yehuda Shiran, Ph.D.
|
|
An enum value in JScript .NET is accessed as an object member. The name of the member should be prefixed by the name of the enumeration, for example tvNetworkType.ABC. When you assign a value to an enumerated variable, you can use a full name (such as tvNetworkType.ABC), a string representation of the name ("ABC"), or a numeric value (1).
When you use a string that is known at compile time, the compiler will perform the necessary conversion. For example, To learn more on JScript .NET, go to Column 108, JScript .NET, Part II: Major Features.
People who read this tip also read these tips: Look for similar tips by subject: |