get enum value c#
C#
enum Colors { Red, Green, Blue };
enum Styles { Plaid = 0, Striped = 23, Tartan = 65 };
public static void Main() {
foreach(int i in Enum.GetValues(typeof(Colors)))
Console.WriteLine(i);
foreach(int i in Enum.GetValues(typeof(Styles)))
Console.WriteLine(i);
}
// OUTPUT:
// 0
// 1
// 2
//
// 0
// 23
// 65int something = (int) Question.Role;
Also in C#:
- Title
- class selector to property in asp net core dropdown
- Category
- C#
- Title
- how to make an object move in unity
- Category
- C#
- Title
- regex replace all special characters
- Category
- C#
- Title
- c# clone stream
- Category
- C#
- Title
- c# ?
- Category
- C#
- Title
- c# loop datatable rows
- Category
- C#
- Title
- c# main method
- Category
- C#
- Title
- object escape player unity
- Category
- C#
- Title
- c# rsa example
- Category
- C#
- Title
- entity framework core
- Category
- C#
- Title
- switch case c# range
- Category
- C#
- Title
- wpf c# select folder path
- Category
- C#
- Title
- c# get foreground window
- Category
- C#
- Title
- how to remove space between string in c#
- Category
- C#
- Title
- how to get component in unity c#
- Category
- C#
- Title
- c# scene manager
- Category
- C#
- Title
- ubuntu: how to open the terminal from c#
- Category
- C#
- Title
- c# to vb.net
- Category
- C#
- Title
- csharp attributes as generics constraints
- Category
- C#
- Title
- windows form rounded corners
- Category
- C#
- Title
- c# listview
- Category
- C#
- Title
- how to load the active scene unity
- Category
- C#
- Title
- simple reset transform.rotation c#
- Category
- C#
- Title
- set current date to textbox in asp.net
- Category
- C#
- Title
- c# check file exists
- Category
- C#
- Title
- c# verify in class exist in list
- Category
- C#
- Title
- unity how to get y value
- Category
- C#
- Title
- c# sort for loop
- Category
- C#
- Title
- c# new list object
- Category
- C#
- Title
- move to where it facing unity 2d
- Category
- C#
- Title
- unity particle system color
- Category
- C#
- Title
- uwp roaming data sample
- Category
- C#
- Title
- what is a return statement C#
- Category
- C#
- Title
- Could not load file or assembly 'Ubiety.Dns.Core, Version=2.2.1.0
- Category
- C#
- Title
- c# typeof
- Category
- C#
- Title
- unity how to tell when a gameobject is colliding
- Category
- C#
- Title
- c# check if argument null
- Category
- C#
- Title
- system.io.directorynotfoundexception c#
- Category
- C#
- Title
- what is using static in c#
- Category
- C#
- Title
- unity mouse click position
- Category
- C#
- Title
- how to create more accurate searching c#
- Category
- C#
- Title
- unity c# is not equal to
- Category
- C#
- Title
- c# add to array
- Category
- C#
- Title
- c sharp if string equals
- Category
- C#
- Title
- xamarin forms alarm
- Category
- C#
- Title
- asp.net model display name
- Category
- C#
- Title
- 5 second timer in c#
- Category
- C#
- Title
- create object in c#
- Category
- C#
- Title
- get number of sundays in a month c#
- Category
- C#
- Title
- radians to degree c#
- Category
- C#
- Title
- c# list to string join
- Category
- C#
- Title
- button color uwp c#
- Category
- C#
- Title
- c# dynamic object get value
- Category
- C#
- Title
- unity gizmo draw line
- Category
- C#
- Title
- xml node update attribute value c#
- Category
- C#
- Title
- block wapalyzer from detecting codeigniter
- Category
- C#
- Title
- format string to date only c#
- Category
- C#
- Title
- asp.net get query string parameter
- Category
- C#
- Title
- C# downloadstirng download old
- Category
- C#
- Title
- mysql C# select pk and all columns datareader
- Category
- C#
- Title
- unity transformer double en float
- Category
- C#
- Title
- unity string format time
- Category
- C#
- Title
- c# auto property set default value
- Category
- C#
- Title
- lat long data type c#
- Category
- C#
- Title
- c# duplicate object instance
- Category
- C#
- Title
- what is a protected int c#
- Category
- C#
- Title
- how to reference function in unity
- Category
- C#
- Title
- trello
- Category
- C#
- Title
- c# object clone
- Category
- C#
- Title
- initialise icollection c#
- Category
- C#
- Title
- how to add system.messaging c#
- Category
- C#
- Title
- C# .net core convert int to enum
- Category
- C#
- Title
- for each textbox c#
- Category
- C#
- Title
- c# how to have a multiline console.writeline
- Category
- C#
- Title
- c# byte array to bitmap
- Category
- C#
- Title
- setting the parent of a transform which resides in a prefab
- Category
- C#
- Title
- unknown discriminator value mongodb
- Category
- C#
- Title
- unity connect to firebase
- Category
- C#
- Title
- two players one phone unity gamne
- Category
- C#
- Title
- .net 4.5 use tls 1.2
- Category
- C#
- Title
- unity how to check object position
- Category
- C#
- Title
- downlaod file and use C#
- Category
- C#
- Title
- isprime c#
- Category
- C#
- Title
- c# read a webpage data
- Category
- C#
- Title
- c# move with arrow keys
- Category
- C#
- Title
- c# param exception
- Category
- C#
- Title
- unity 2d detect click on sprite
- Category
- C#
- Title
- query associative table ef6
- Category
- C#
- Title
- unity if gameobject exists
- Category
- C#
- Title
- change sprite of gameobject unity
- Category
- C#
- Title
- replace all ponctuation characters c#
- Category
- C#
- Title
- how to remove file changes in git
- Category
- C#
- Title
- c# properties
- Category
- C#
- Title
- unity 3d character controller
- Category
- C#
- Title
- Move player on planets in unity 2d
- Category
- C#
- Title
- c# webrequest cookies
- Category
- C#
- Title
- parsing object from text file c#
- Category
- C#
- Title
- unity lerp
- Category
- C#
- Title
- create line in unity
- Category
- C#
- Title
- c# exit for
- Category
- C#