diff --git a/X10D/src/StructExtensions.cs b/X10D/src/EnumExtensions.cs
similarity index 90%
rename from X10D/src/StructExtensions.cs
rename to X10D/src/EnumExtensions.cs
index 92f5da5..2aff3d9 100644
--- a/X10D/src/StructExtensions.cs
+++ b/X10D/src/EnumExtensions.cs
@@ -3,9 +3,9 @@
namespace X10D
{
///
- /// Extension methods for types.
+ /// Extension methods for types.
///
- public static class StructExtensions
+ public static class EnumExtensions
{
///
/// Returns the next value in an using the specified value as a starting point.
@@ -18,11 +18,11 @@ namespace X10D
///
/// Returns a value.
public static T Next(this T src, bool wrap = true)
- where T : struct
+ where T : struct, Enum
{
if (!typeof(T).IsEnum)
{
- throw new ArgumentException($"Argument {typeof(T).FullName} is not an Enum");
+ throw new ArgumentException($"Argument {typeof(T).FullName} is not an enum");
}
var arr = (T[])Enum.GetValues(src.GetType());
@@ -41,7 +41,7 @@ namespace X10D
///
/// Returns a value.
public static T Previous(this T src, bool wrap = true)
- where T : struct
+ where T : struct, Enum
{
if (!typeof(T).IsEnum)
{