When you need to limit a value to a certain range, you have to use an enumeration type, which is the same as the enumeration concept in the VB.
such as:
Public Enum EnmfillColor
{
Blue,
Green,
Red
}
In C #, each enumeration has an intrinsic default type to determine storage allocation. If you do not specify a basic type, you will use Integer. Please see the example of the specified basic type:
ENUM SMALLENUM: BYTE
{
A,
B,
C,
Di
}
}
Delegates
Delegates is used to define a template for a separate method instead of defining a template for a series of related methods. A delegate is defined a function but does not perform it. Delegates played between an event source and an event purpose to an intermediate medium.