 In this video, you will learn most of the basic variables in C sharp. Hello guys, it is Crypto Grounds here. Welcome back to another Unity idle game tutorial video. This is episode 1.3 and today I'm going to be teaching you some of the basic variables that you can use in C sharp. If you learned something new and if you enjoyed this video, make sure you smash that like button to show some support, comment all your feedback questions, all that good stuff below, subscribe to my channel if you're new and turn on notifications for future live streams and videos. Anyways, let's get on with it. So we're going to be going in our data class right here, just to show you a bunch of example variables. Now obviously you don't need these, I'm just going to be explaining what all of these variables are because there's quite a bit. Now, just because there's quite a bit doesn't mean you're going to use all of these. I promise you're not going to use all of these, but it's good to understand what these are. I also have a crash course on this if you are interested as well, link will be in the description below. So basically let's start with the integers here. So if you know what integer it's basically a whole number has no decimals, no floating point numbers, it's just a whole number. So you see that there's int and you int and you kind of see the general theme long, you long, short, you short, bite, S bite. Okay, so it's kind of a pattern here. So what's the difference between a signed and an unsigned one. So basically an unsigned integer or an unsigned variable is basically when it saves one of its bits for an extra storage. So so an int is basically a 16 bit integer, a whole number. Now a normal integer can go negative as well. Now it uses one of those bits to determine if it's negative or not. So when unsigned one is it doesn't do that. So it can only be a positive number. So zero or greater. However, the max value will be higher than the signed int. And that's the exact same thing with longs assigned along will have a lower minimum, a negative minimum, and a lower maximum. However, an unsigned long will have a minimum of zero, but it'll have a higher maximum than assigned along against the same thing with short. And now bytes is a little different. So instead of you bite, it's just bites. So bite is where it's positive only zero through 256. Now S bite is where it goes from negative 128 to 127. So you can see that there's a difference there. A good site to learn about all the min and max is here is C sharp stations, C sharp data types, operators and variables in lesson two, you can just search up all the different types of variables in C sharp on Google, and you'll eventually come across this site. And you can see all the different types of ranges here for the different variables. And you'll also have the same thing for floating point and decimal types, such as float, double and decimal, which we will explain. So an int is a 32 bit integer, long is a 64 bit short is an eight bit, no 16 bit, and a bite is an eight bit integer. Okay, so that's all the different types of integers here. So now we have floats, doubles and decimals. So okay, so now let's talk about the floats, doubles and decimals. So a float is a 32 bit floating point variable, while double is 64 bits, and a decimal is a 128 bit. So now each of these has different purposes. So floats obviously being the smallest, if you don't need that much precision, and if you don't expect your decimal numbers to go big, floats would be a good use for these because they are pretty much 32 bits, which is half the size of a double. And that's a quarter, that's one fourth size of a decimal. So pretty much if you if you know what these variables are going to do, how big they're going to get and how precise you want to be, that's how you determine the difference between all three of these. So okay, so that's a float, a double is the biggest, where it has a 1.79 times 10 to the power of 308 size, that's the maximum. And it can also all three of these can also go negative by the way. And it is fairly precise. And a decimal is the most precise, but it's the smallest out of three. So if you go back to this site here, and explains that yeah, this is 32, 64, 128. Now floats have a seven digit precision. So doubles have a 15 to 16, while decimals have a whopping 28 to 29 decimal places. And now that's very, that's pretty much the entire thing, the max size. So it's very precise, but again, it's very small. And yeah, again, all of these can go to the minimums. And they have, these are the maximums, these are just the ranges of these three. So now let's talk about a string. So a string is technically an array of chars or characters, that's basically what it is. So a character is a single letter or a single key. So you can set it to, for example, a. So that's char. It's a, okay. And now a string, a string is a series of these. So you use parentheses for these ones. So you can make them whatever you want. And this is a valid string. And this is a valid char. Now you cannot do this. This is illegal. Okay, you must use these instead. And there you go. That is a char. Okay, so that is it for this video. If you guys understand, and if you guys learn something new today, I hope you guys understood. First of all, I know it was kind of quite a bit of information. Again, you can check out this website. I closed it, but you can check out that website I showed previously if you needed help. And if you wanted a more something to read to understand. So yeah, be sure to check that out. And again, if you enjoyed this video, smash that like button, subscribe to my channel if you're new, and turn on the bell for future notifications of videos and live rooms. Anyways, have a great day night. I'll catch you guys in episode 1.4, which will be explaining how to create methods, which I've kind of done in the past, explain how to create different types of methods, and explain deep down what they really are. Catch you guys in the next one. Peace.