NTT DATA Interview Question

What's is enum and its use?

Interview Answer

Anonymous

Mar 14, 2019

In C#, enum is a value type data type. The enum is used to declare a list of named integer constants. It can be defined using the enum keyword directly inside a namespace, class, or structure. The enum is used to give a name to each constant so that the constant integer can be referred using its name.