Program to define various types of constants in C#
As in other programming languages, various types of constants are defined the same as defined in C#, we can also define various types of constants and print their values. They are fixed in values in the program. There can be any types of constants like integer, character constants, float, double, string, octal, hexadecimal, etc.
Define constant: By using const keyword a constant can be defined. Its value can never be changed once it is defined.
const data_type constant_name = value;
Input: const int a = 15; Output: a: 15
A: 15 B: 50.83
C: S D: 70.23 E: Geeks