it aint great at c# i can tell you. this from grok yesterday:
foreach (string enumName in Enum.GetNames(typeof(Pair)))
{
if (input.Contains($"${enumName}"))