HomePosts tagged โ€œEnumโ€

Enum

Showing 1 - 11 of 11 results
This is a really simple one . Below is a simple example of an enum called โ€œDesignationโ€ defined with the...
The enumeration in C# lets the developers to define a limited set of known values. For example , I can...
You might encounter an scenario where you have to find out if the integer value that is passed needs to...
Want to know what is the use of Tilde (~) symbol in C# especially when using enum definition?. Letโ€™s have...
Ever wondered what is Flags attribute in C#? . Hereโ€™s the post that explains with an example on what is...
There are times when you want to get the attributes of the enum values from your C# code for some...
Sometimes , it may be necessary for the C# developers to loop through or iterate over all the Enum Values...
You can get the total number of items defined in an enum in C# using the combination of the Enum.GetNames...
Below is a sample code snippet demonstrating on casting an integer to enum in C#. How to cast an integer...
Below is a sample code snippet demonstrating how to convert a string Eg: โ€œBlueโ€ to Enum value . How to...
You can easily enumerate an enum in C# using the Enum.GetValues static method which returns the array. How to enumerate...