In this article we will check what are constants in C#.Net.
You can also check out
A constant is a variable whose value cannot be changed throughout its lifetime. We have to use const keyword to declare a constant like below:
const int number = 10;
some points to remember while working with constant:
– They must be initialized when they are declared; and after a value has been assigned, it can never be overwritten.
– The value of a constant must be computable at compile time. You can’t initialize a constant with a value taken from a variable. If you need to do this, you must use a read-only fi eld
– Constants are always implicitly static.
Download FREE SharePoint 2019 Installation PDF Guide
This FREE PDF contains, Steps by step guide to install SharePoint 2019 Preview, prerequisites, hardware and software new features. First impression to SharePoint Server 2019 new modern site, modern lists and modern document libraries.
You May Also like the Following SharePoint Online Tutorials: