---
title: "Enumeration in C#"  
description: "The enum keyword is used to declare an enumeration, a distinct type consisting of a set of named constants called the enumerator list. It is user defi"  
author: "Amit Singh"  
published: 2011-01-01  
updated: 2026-05-12  
canonical: https://www.mindstick.com/blog/88/enumeration-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Enumeration in C#

##

The enum keyword is used to declare an enumeration, a [distinct](https://www.mindstick.com/forum/159558/why-c-sharp-linq-distinct-doesn-t-work) type consisting of a set of named [constants](https://www.mindstick.com/articles/1813/objective-c-constants) called the enumerator list. It is [user defined](https://www.mindstick.com/forum/34125/how-to-find-list-of-all-user-defined-tables-using-sql-server) data types. Every enumeration type has an underlying type, which can be any integral type except char. The default underlying type of the enumeration [elements](https://www.mindstick.com/forum/1440/wpf-button-with-multiple-text-elements) is int. By default, the first enumerator has the value 0, and the value of each successive enumerator is increased by 1

How use enum keyword in our program

\

Example 1:

\

enum Days { Sat = 1, Sun, Mon, Tue, Wed, Thu, Fri }; \
protected void Page_Load(object sender, EventArgs e) \
{ \
int x = (int)Days.Sun; \
[Response.Write](https://www.mindstick.com/forum/1031/response-write-doesn-t-display-image)(x); \
}

Enums have these [benefits](https://www.mindstick.com/articles/75377/surprising-benefits-of-learning-to-code):

· They restrict the values that the enum [variable](https://www.mindstick.com/articles/1807/objective-c-data-types-variables-object-creation) can take.

· They force you to think about all the [possible values](https://www.mindstick.com/forum/23337/hibernate-hbm2ddl-auto-possible-values-and-what-they-do) that the enum

can take.

· They are a constant rather than a number, increasing readability of

the [source code](https://www.mindstick.com/forum/33476/pls-send-me-source-code-for-changing-passward-in-asp-dot-net-i-tried-so-much-from-google-but-its-not-workining)

you can also read these related post

[https://www.mindstick.com/articles/11950/enumeration-in-c-sharp](https://www.mindstick.com/articles/11950/enumeration-in-c-sharp)

---

Original Source: https://www.mindstick.com/blog/88/enumeration-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
