​​How to loop through an enum in C#? (part 2)



The Enum.GetValues<TEnum>() is a static method that retrieves an array of the constant values of the specified enum.



The following example shows how to get the values of an enum using the Enum.GetValues<TEnum>() method.



💬 The channel has been running since 2018. It needs your support: https://www.patreon.com/csharp1001notes