C# Program to change the value in declaration. In this program we can print the numbers value which is reassigned or declared in the C sharp. In the declaration of a variable, you tell the compiler the name of the variable, its type, and if it has an initial value. is a declaration of a variable’s properties. When it comes to variables, the definition of the variable tells us how it is stored.
static void Main(string args)
int num = 1;
num = 2;
What is Console.WriteLine() in C sharp programming language
In the System namespace, Console is a class that is already defined. When it comes to the Console Class, Write() and WriteLine() are both methods. Instead of printing a new line, Write is used to output data. While printing a new line, WriteLine prints data.
What is Integer datatype in C#
Why data types are important in C#
A strongly-typed programming language, C# has data types such as integer, character and float that are predefined as part of the programming language, and all constants and variables defined for a given programme must be described with one of the data types in order to run.