Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

loop through an enum c#

public enum Days {
  Monday,
  Tuesday,
  Wednesday
}

foreach(Days day in Enum.GetValues(typeof(Days))) {
  
}
Comment

Loop through enum C#

enum Foos {
  Foo,
  Bar,
}

foreach(Foos val in Enum.GetValues(typeof(Foos))) {
  //Do whatever with the value :D
}
Comment

c# iterate enum

var values = Enum.GetValues(typeof(Foos));
Comment

c# iterate enum


var values = Enum.GetValues(typeof(Foos));

Comment

PREVIOUS NEXT
Code Example
Csharp :: c# cancellationtoken example 
Csharp :: c# linq select only unique values from list 
Csharp :: how to stop animation unity 
Csharp :: dotnet new api 
Csharp :: instantiate unity in parent 
Csharp :: weapon switching unity 
Csharp :: validating file upload asp.net core mvc 
Csharp :: change image of button c# 
Csharp :: how to duplicate a clip in premiere pro 
Csharp :: windows form textbox password 
Csharp :: .net core copy directory to output 
Csharp :: c# see if list contains any duplicates 
Csharp :: remove all array elements c# 
Csharp :: all possible substrings of a string 
Csharp :: parent unity 
Csharp :: NameValueCollection 
Csharp :: c# foreach object in array json 
Csharp :: if statement c# 
Csharp :: how to get total scenes unity 
Csharp :: .net core web app get dll name 
Csharp :: rotation unity script 2d 
Csharp :: use slider in unity 
Csharp :: c# linq select as new object 
Csharp :: c# csvhelper 
Csharp :: how to add rigidbody in unity 
Csharp :: cast char[] to string c# 
Csharp :: remove force unity 
Csharp :: unity add button 
Csharp :: set margin programmatically wpf c# 
Csharp :: authentication and authorization in asp.net c# with example 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =