-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnumeration.cs
More file actions
38 lines (37 loc) · 1.01 KB
/
Enumeration.cs
File metadata and controls
38 lines (37 loc) · 1.01 KB
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
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharpProgramming
{
/// <summary>
/// Enumeration - assign constant names to integral values
/// enum keyword
/// value type datatypes
/// </summary>
internal class Enumeration
{
/// <summary>
/// User-defined enum
/// </summary>
enum FrontEndTech
{
Angular,
React,
Vue,
ElectronJS = 7,
Next
}
public static void Main()
{
Console.WriteLine(FrontEndTech.Angular);
int vue = (int)FrontEndTech.Vue;
Console.WriteLine($"Integral value of Vue:{vue}");
var electron = (FrontEndTech)7;
Console.WriteLine($"Constant name with integral value 7 is {electron}");
var next= (FrontEndTech)8;
Console.WriteLine($"Constant name with integral value 8 is {next}");
}
}
}