case string to enum c# code example Example: string to enum c# Enum.TryParse("Active", out StatusEnum myStatus);