consulo-csharp
consulo-csharp copied to clipboard
No error inside array initializer with explicit type
Error:
Cannot implicitly convert type 'dsadas.DA' to 'short'. An explicit conversion exists (are you missing a cast?)(CS0266)
Code:
public enum DA {
STRING,
STRING2
}
public class EnumError {
public void test() {
short[] array = new short[]{DA.STRING, DA.STRING2};
}
}