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