mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
19 lines
444 B
C#
19 lines
444 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Remotely.Shared.Utilities
|
|
{
|
|
public static class EnumMapper
|
|
{
|
|
public static ToType ToEnum<ToType, FromType>(FromType fromValue)
|
|
where ToType : Enum
|
|
where FromType : Enum
|
|
{
|
|
return (ToType)Enum.Parse(typeof(ToType), fromValue.ToString());
|
|
}
|
|
}
|
|
}
|