aboutsummaryrefslogtreecommitdiffstats
path: root/src/IOL.Helpers/EnumHelpers.cs
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2021-04-01 22:36:59 +0200
committerivarlovlie <git@ivarlovlie.no>2021-04-01 22:36:59 +0200
commit9e0fbac6d3cb4e11efdb33c339ccf0adbca0bc6c (patch)
tree8fd1e8710abc3b17f0bc7f960c89931efd83c944 /src/IOL.Helpers/EnumHelpers.cs
downloaddotnet-helpers-9e0fbac6d3cb4e11efdb33c339ccf0adbca0bc6c.tar.xz
dotnet-helpers-9e0fbac6d3cb4e11efdb33c339ccf0adbca0bc6c.zip
Initial commit
Diffstat (limited to 'src/IOL.Helpers/EnumHelpers.cs')
-rw-r--r--src/IOL.Helpers/EnumHelpers.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/IOL.Helpers/EnumHelpers.cs b/src/IOL.Helpers/EnumHelpers.cs
new file mode 100644
index 0000000..b63e045
--- /dev/null
+++ b/src/IOL.Helpers/EnumHelpers.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace IOL.Helpers
+{
+ public static class EnumHelpers
+ {
+ public static IEnumerable<T> GetValues<T>() {
+ return Enum.GetValues(typeof(T)).Cast<T>();
+ }
+ }
+} \ No newline at end of file