143.

____ is a user defined integer type which provides a way for attaching names to numbers, thus increasing the flexibility of code

Choose the best correct answer


C# enum (enumerator) is a user defined integer type which provides a way for attaching names to numbers, thus increasing the flexibility of code. The enum keyword automatically enumerates a list of worlds by assigning those values 0, 1, 2 and so on. This C# enum facility provides an alternative means of creating ‘constant variable names. The syntax of a C# enum statement is given below:

enum area

{

     Length,

     Breadth

}

This C# enum initialization can also be written as follows:

enum area {Length, Breadth}

Here Length has the value 0, Breadth has the value 1.

Other examples of C# enum are:

enum days { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}

enum position { off, on}