---
title: "How to use Enum in c# .net."  
description: "How to use Enum in c# .net."  
author: "Anonymous User"  
published: 2015-11-23  
updated: 2015-11-23  
canonical: https://www.mindstick.com/forum/33625/how-to-use-enum-in-c-sharp-dot-net  
category: ".net"  
tags: ["c#", ".net"]  
reading_time: 1 minute  

---

# How to use Enum in c# .net.

I want to use [Enum in c#](https://www.mindstick.com/forum/159625/convert-a-string-to-an-enum-in-c-sharp) please help me

## Replies

### Reply by Anonymous User

An enumeration is a set of named integer constants. An enumerated type is declared using the [enum](https://www.mindstick.com/forum/159626/how-can-i-cast-a-string-to-an-enum) keyword.\
C# enumerations are value data type. In other words, enumeration contains its own values and cannot inherit or cannot pass inheritance.

```
using System; namespace Forum{    public class Enum    {        enum Month { January, February, March, April, May, June, July, August, September, October, November, December };        static void Main(string[] args)        {            Month value = Month.January;            if (value == Month.January)            {                Console.WriteLine("This Month is January.");            }            Console.ReadLine();        }    }}
```

```

```


---

Original Source: https://www.mindstick.com/forum/33625/how-to-use-enum-in-c-sharp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
