Answers for "enum get all values"

6

enum foreach

foreach (Suit suit in (Suit[]) Enum.GetValues(typeof(Suit)))
{
}
Posted by: Guest on March-23-2020
0

enum get all values C#

//typed
var values = Enum.GetValues(typeof(Foos)).Cast<Foos>()
Posted by: Guest on April-28-2021

Browse Popular Code Answers by Language