17 lines
469 B
C#
17 lines
469 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Code.Infrastructure.Utils
|
|
{
|
|
// Source - https://stackoverflow.com/a/972323
|
|
// Posted by JaredPar, modified by community. See post 'Timeline' for change history
|
|
// Retrieved 2026-07-22, License - CC BY-SA 4.0
|
|
// Thanks to him :)
|
|
public static class EnumUtil {
|
|
public static IEnumerable<T> GetValues<T>() {
|
|
return Enum.GetValues(typeof(T)).Cast<T>();
|
|
}
|
|
}
|
|
|
|
} |