Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-889.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0ba66e45208ae7cc1513487412d8d51070a921e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class Test
{
    public enum Ebyte : byte
    {
        Mask = 1
    }

    public enum Esbyte : sbyte
    {
        Mask = -127
    }

    public enum Eshort : short
    {
        Mask = 1
    }

    public enum Eushort : ushort
    {
        Mask = 1
    }

    static void Main ()
    {
        byte v1 = (byte)(~Ebyte.Mask);
        sbyte v2 = (sbyte)(~Esbyte.Mask);

        short v3 = (short)(~Eshort.Mask);
        ushort v4 = (ushort)(~Eushort.Mask);
    }
}