May 2010
Intermediate to advanced
1272 pages
61h 18m
English
You use enumerations as any other .NET type. For example, consider the following method that receives the Sports enumeration as an argument and returns a response depending on what value has been passed:

The following code snippet then declares a variable of type Sports, assigns a value, and then invoke the method passing the variable:
Dim mySport As Sports = Sports.Climbing AnalyzeSports(mySport)
Notice how IntelliSense comes in when you need to specify a value whose type is an enumeration. Figure 11.1 shows the IntelliSense’s pop-up window related to our custom enumeration.
Figure 11.1 IntelliSense provides flexibility in ...
Read now
Unlock full access