 Hello guys, Crypto grounds here. Welcome back to another C sharp crash course video. This is episode four and we're going to do variables. Alright, so we are at 1005 subscribers. So if you're new here, make sure you like drop a like if you like the video and subscribe and turn on the bell notifications. Alright, so let's get on with the variable stuff. Also one thing for I forget to mention. If you haven't seen my 1000 like any of my 1000 subscribers special videos, make sure you check it out. It will pop up right here. Alright, so we have our variables right here set up already. We have int float double bull char string short long by in decimal. So I'm going to explain every single one of these. So first we're going to start with the size. Alright, so int is a 32 bit. It's a 32 bit whole number. We have floats double. I'm going to get to these ones first, but we're going to finish the whole numbers first. We have int short long bite. So basically bite is an eight bit version of an int long is a 16 bit version and short. No, no, no, I flipped them. My apologies short is a 16 bit is 16 bit and long is a 64 bit of an integer. Alright, so now we have our floating point numbers or variables. We have floats double and decibel. So basically double can store the most and has the second most decimal like precision, decimals of precision floats has the least and decimal has the most. But decimal stores the least amount. So I'm going to show you that in a second. I'm going to show you that right now. So float is a 32 bit double is a 64 bit while decimal is a 128 bit. Alright, so we have two more to go. We have bull and char and string. So we have three. So bull is simply a one bit. Why? Because it's zero. It's either zero one. It's just one bit. So zero one true false zero being false one being true. And char is an eight bit, which is basically just an ASCII character. So string on the other hand is a little special. String is actually class. Now, alright, so I was editing the video and I was talking about strings and I actually like wrote a bunch of stuff down and that was kind of incorrect. So I'm going to have to like go back and work my way there. So basically strings are different. Well, they're just like any other variable, but it is an alias of the of the capital string class. So this isn't a class, but it is an alias of the class like that. So but it's just like how int is the alias to system dot int 32. It's like how long is the alias to system int 64 string is the alias to I believe it's just string like capital string, maybe system dot string. I don't remember the top of my head and string is a string of chars basically. So we can't really say what help with the size of it is right. So if we want to convert all of so if we want to convert all of these to wrapper class or not a class that's original class. This one is system dot float. And also a lot of these are used for stuff like like in 32 convert in 32. No, no, that's not that doesn't count. You know that but like stuff like float dot pairs. You've probably seen that before float dot pairs. It's where you convert a string to a float. It's the same thing. That's the float class right there. It's literally the same thing. Right. We also got system dot double. I think this is system dot Boolean. I can't. Yeah, it is system dot Boolean. We got system dot char. And these are easy to memorize by the capitalization. Some of them like Boolean is different. And system and long of course are different. We have system dot int 16 system dot int 64 for long that's for short and bite the system dot bite. And so also this video might be a little longer than the rest because there's a lot of information from variables. And also there's system dot decimal. Dimus any I don't think so think that's it. Um, so storage. Let's get on with that. Now I can't exactly remember the exact ones except for a few. So I know int is very small we have floats which it's around 7.4 E 38 double. On the other hand is 1.78 E 308 and decimal is 7.9 E 28. So it's the smallest out of all of them. Um, now you don't need to memorize these. But if you're familiar with them, if you want to know what your limit is, it's kind of good to know. All right. So bytes. Now bite has a very small capacity. So since it's an 8 bit, the smallest thing goes 255 or that's the largest. It can go from zero to 255. So it's got to be positive. All right. So these are the maxes. By the way, these are max max men. We can do men after this. All right. So integers. It's a long number. But here we go. We'll write this out. Three, six, four, seven, that's the max. And the men for an integer is the negative version of this, but it's eight. So the minimum is two, negative two, one, four. No, it's two, one, four, seven, four, eight, three, six, four, eight. All right. So bull, we don't need that char. We don't need that short short. All right. So the maximum for this one is actually quite small. 32,762. No, 67, my apologies. And the men for this one is negative 32,768. All right. So that clearly it's smaller because it's 16 bit. Hopefully that kind of starts to make sense. All right. So long, longs are going to be a little bigger. Now I don't really feel like writing this all out. But basically what we can do is we'll just write out the scientific notation, but it's 9018. I don't want to write out that whole number. And for negative, it's also or the minimum it's negative 9018. All right. Bites minimums are zero. Decimal has a minimum of negative one E 28. I think that is all I need to review if we can do precision for these ones for float double and decimal. So we'll do that real quick. Now, oh, I haven't done float and double yet. Okay. So the minimum for double is negative is negative five E 324. All right. Now for float, it's negative 1.5 E 35. No, it's not E 45. It's E 45. All right. So take a look at those. Hopefully you understand that those are the men's, those are the max, and that is the size of each one of those. Again, string is different. So just remember that. Okay. Now let's talk about float double and decimal real quick. Okay. So basically floats have the smallest precision. So float is seven digits of precision floats. All right. Now doubles, on the other hand, are 15 to 16 digits. Now I don't know exactly why 15 to 16. I don't know why not just one or the other. But that's it. Same for decimals. 28 to 29 decimal digits of precision. So you can see there are some there are some advantages between all of these. The problem with decimal, it's quite very high on storage, right? So again, you really need to pay attention to these if you're really concerned about storage or RAM usage, right? So if you're just if you have like 1000s of levels or something like that, don't use long, you could use, you could use short in all honesty, if you don't believe you're going to get above this number, you could use short. But in general, you just use int. So just remember be cautious of what you're using this for. If you need something that's very precise, use decimals or double. If you need something that's not so precise, use floats, but also not so big. If it's so big, then you got to use doubles. All right, what else do I got to discuss? I think that's it. I think that's all I got. If you guys have any questions below, let me down in the comments. I have, I have like 20 more of these videos to go. So anyways, subscribe if you... All right, so my my phone just ran out of storage made a video. So sorry if there's like a weird cut or something. But anyways, thank you guys for watching. I hope you guys enjoyed this one. I have like 20 more videos upcoming after this. So make sure you drop a like if you enjoyed. Comment below if you have any questions and subscribe to my channel if you're new and make sure you turn on the bell for future notifications. Anyway guys, thank you for watching. Peace.