Storing number in int variable - CSharp Language Basics

CSharp examples for Language Basics:int

Description

Storing number in int variable

Demo Code

using System;/*from w ww. ja  v a  2  s  .  c  o  m*/
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
   static void Main(string[] args)
   {
      // Variable for storing number (with initial value)
      int number = -12;
      // Output of value of the variable
      Console.WriteLine("Value of the variable: " + number);
   }
}

Result


Related Tutorials