adspace


What is default value of enum c#?

Answer Posted / Bhagat Singh

In C#, when an Enum type is declared without any explicit initial values, it automatically gets assigned integer values starting from 0. For example: 'EnumType { Value1, Value2 }' will have 'Value1' with a value of 0 and 'Value2' with a value of 1.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is expression tree in c#?

998


Which namespaces are necessary to create a localized application?

1142


How do you inherit a class into other class in c#?

993


Why can't we use a static class instead of singleton?

954


What is an abstract class c#?

969


How to assign Null value to Var?

1063