using System.Text.RegularExpressions;
foreach (var studentType in Enum.GetValues<StudentType>())
Console.WriteLine($"{studentType} -> {studentType.ToCamelString()}");
public static partial class Extensions
public static string AddCamelSpace(this string str) => Regex.Replace(Regex.Replace(str,
@"([^_\p{Ll}])([^_\p{Ll}]\p{Ll})", "$1 $2"),
@"(\p{Ll})([^_\p{Ll}])" , "$1 $2");
public static string ToCamelString(this Enum e) =>
e.ToString().AddCamelSpace().Replace('_', ' ');