Home>

When there are two enum types in c #, can the same character strings be type-converted? For example, I would like to convert color2 to color3 with the code below.

public enum Colors {red, blue, yellow}
public enum Colors2 {red, blue, yellow}
Colors color = Colors. Red;
Colors color2 = Colors2. Red;
Colors color3;