c# enum.getvalues
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
// 65
Also in C#:
- onmouseclick unity
- unity custom update
- string isnullorempty vs isnullorwhitespace
- how to update modal class using dbfirst in asp.net core
- make a list c#
- winforms c# add data to datagridview with a button
- c# null conditional operator if statement
- c# get binary array from int
- asp.net core allow all origins
- c# loop through object
- download and run exe c# 1 button
- asp.net core 3.1: cast jObject to dictionary<string,string>
- how to change scenes in unity
- how to declare variables in c#
- wpf use enum description
- button commandfield commandargument pass textbox
- get what week of the month c#
- variables
- what is using static in c#
- fly cam extended script unity 3d
- reverse a string in c#
- string to guid c#
- c# razor add disabled to button if
- c# list to string comma separated