我知道这是以前的答案,但我似乎无法找到我想要的答案,其他的都太具体了。这是我的一般问题;你如何覆盖一个枚举?这行得通吗?
//Enum in the main class it is defined in
public enum GameDifficulty
{
i1,
i2,
i3
}
//Enum class being imported:
using game1.classwithenum;
//Would this override the enum and replace i1, i2, and i3 with f1, f2, and f3?
public enum GameDifficulty
{
f1,
f2,
f3
}