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