Cast integer to enum in C#
Enum values can be converted to integral values and vice versa using type casts. For example: using System; public class Program { public enum ProgrammingLanguages { CSharp, PHP, Python, Java, Go, Javascript } public static…