convert string to enum and store it in property c# code example
Example 1: string to enum c# 3
StatusEnum MyStatus = (StatusEnum) Enum.Parse(typeof(StatusEnum), "Active", true);
Example 2: c# convert string to enum value
using System;
Enum.tryParse("input", out EnumName myEnum);