Import from internal git

This commit is contained in:
2025-10-11 13:08:09 +02:00
commit 97aaa715dc
175 changed files with 7014 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
namespace Core.Helpers;
public static class EnumHelper
{
/// <summary>
/// Retrieved maximum possible value in an enum. In other words, return the number of values contained in the enum
/// </summary>
/// <typeparam name="T">Enum</typeparam>
/// <returns>Number of possible values</returns>
public static int GetMaxValue<T>() where T : Enum
{
var i = Enum.GetValues(typeof(T)).Length;
return i;
}
}