Skip to main content

Learn C# Programming in Easy way, Step-3. Variables, Datatypes, values.

Hi, Welcome to all. My name is Abdul Yesdani. Today we are going to learn how to work with different types , what is a variable, how the values are stored in a variable and how to work with numbers.

A variable is a memory location to store a value or data. Different datatypes of variables needed to store different data. Numeric data types : int, double, float, decimal.

Variables will be declared in association with data types.

Example: int number =78;

In the above statement 'int' is datatype and number is variable , '=' is assignment operator and '78' is value assigned to the variable.

Create a new Console app in the Visual studio IDE, give a relevant name to the app. 

Type the following code in the code editor.



Run the application by pressing CTRL + F5 keys . You will get the output as shown below.



Watch the video for the same.











    

Comments

Popular posts from this blog

SQL server

  Microsoft SQL Server: Microsoft SQL Server is a relational database management system (RDBMS). Applications and tools connect to a SQL Server instance or database, and communicate using Transact-SQL (T-SQL). You can install SQL Server on Windows or Linux, deploy it in a Linux container, or deploy it on an Azure Virtual Machine. SQL Server components and technologies: Database Engine The Database Engine is the core service for storing, processing, and securing data. The Database Engine provides controlled access and transaction processing to meet the requirements of the most demanding data consuming applications within your enterprise.  Integration Services SQL Server Integration Services (SSIS) is a platform for building high performance data integration solutions, including packages that provide extract, transform, and load (ETL) processing for data warehousing. Analysis Services SQL Server Analysis Services (SSAS) is an analytical data platform and toolset for personal, te...

C# Tutorial , Step-5, Built in Data Types

 Hello, Welcome to all. My name is Abdul Yesdani. Today we are going to learn about built in data types of C# language. The following list describe the C# built in types. Integral numeric types Type Description / Range bool True or false byte 0-255     Unsigned 8 bit integer sbyte -128 to 127       Signed 8 bit integer short -32,768 to 32,767         Signed 16-bit integer ushort 0 to 65,535               Unsigned 16-bit integer int -2,147,483,648 to 2,147,483,647    Signed 32-bit integer uint 0 to 4,294,967,295     Unsigned 32-bit integer long -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Signed 64-bit integer ulong 0 to 18,446,744,073,709,551,615 Unsigned 64-bit integer Floating Types float ±1.5 x 10−45 to ±3.4 x 1038             4 bytes double ±5.0 × 10−324 to ±1.7 × 10308        8 bytes decimal ±1.0 x ...