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

test-279.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: be1d7fba81fc9a35a02caaa365e259171b607958 (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
using System;

class FlagsAttributeDemo
{
    // Define an Enum with FlagsAttribute.
    [FlagsAttribute] 
    enum MultiHue : short
    {
        Black = 0,
        Red = 1,
        Green = 2,
        Blue = 4
    };

    static int Main( )
    {
        string s = ((MultiHue)7).ToString ();
        
        Console.WriteLine (s);
        if (s != "Red, Green, Blue")
            return 1;
        return 0;
    } 
}