Skip to content

Instantly share code, notes, and snippets.

@alaawahbah
Created April 25, 2024 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alaawahbah/5d805259ecaa51ded00cc28db6c5b60a to your computer and use it in GitHub Desktop.
Save alaawahbah/5d805259ecaa51ded00cc28db6c5b60a to your computer and use it in GitHub Desktop.
var categories = Enum.GetValues(typeof(CategoryType)).Cast<CategoryType>().ToList();
categories.Dump();
categories.ForEach(t => {
(t == CategoryType.Category2).Dump();
});
public enum CategoryType
{
Category1 = 1,
Category2 = 2,
Category3 = 3,
Category4 = 4,
Category5 = 5,
Category6 = 6,
Category7 = 7,
Category8 = 8,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment