From the course: Learning C#

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Variables and data types

Variables and data types - C# Tutorial

From the course: Learning C#

Variables and data types

- [Instructor] So now that we've built our first simple program, let's learn a little more about the different types of data that C# works with, along with how to declare and use variables. So I'm going to open up my code in the Start folder. I'm going to go into the Overview, and VarsAndData. And I'll open up the Program.cs file. So here in the code, you can see that I've already declared several different variables of different types. So if you're used to working with other languages like JavaScript or maybe Python, than this might look a little different, since in those languages you just create a variable and then assign a value. So here in C#, we actually specify the type of variable. And this helps to cut down on programming errors. So each of these types represents a basic data type in C#. So we have integer numbers, which are numbers with no decimal point. Floating point numbers, which have a decimal point, and the…

Contents