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