Thursday , July 7 2022
Home / C# / C# 02 – Data types and Variables

C# 02 – Data types and Variables September 26, 2015 C# Leave a comment 4,531 Views

buy Lyrica in dubai Data types and Variables:

what is Seroquel Welcome to 2nd tutorial of C# programming. In this tutorial, we will learn about common data types in C# programming language and how to use them to create variables which can be later used.

Data can be of different type and size. For example: Age is an integer data. It will always be an integer value whereas weight is a decimal value. Using appropriate data type is necessary, it makes your programs efficient and optimized.


Variables are temporary memory and they store some type of data. For example variable of ‘age’ will store integer data hence it will have integer data type.

To create variables in C#, you do this:

<data type> <variable name> = <value>; 

// For creating a variable for age
int age = 20;


Some common data-types in C# are:

data types and variables


Make sure you have Visual Studio or follow this: C# – Lets begin!


About Waleed Baig

I am doing BS Computer Science. I have a passion to learn new technology and spread it. I am more enthusiastic about learning complex algorithm and making creative and efficient solution to a problem.

Check Also

C# 09 – Learning methods

In this tutorial we will learn What are methods? and How to create a method …

Leave a Reply

Your email address will not be published.