Using Operators with Enumerations : Enum base type : Data Type C# Examples


C# Examples » Data Type » Enum base type »

 

Using Operators with Enumerations









    
using  System;
      
public  enum  FileAttributes
{
        AttrNone  =  0,
        AttrReadOnly  =  1,
        AttrHidden  =  2,
        AttrReadyForArchive  =  4
}
      
class  MainClass
{
        public  static  void  Main()
        {
                FileAttributes  FileAttr;
      
                FileAttr  =  FileAttributes.AttrReadOnly  |  FileAttributes.AttrHidden;
                Console.WriteLine(FileAttr);
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Enum base type