‫Welcome back.
‫In this video, we are going to check out the solution for the challenge of the last lecture.
‫And let's go ahead and start with understanding what the challenge was about.
‫So, first of all, I wanted you to create a variable for each of the different data types that you
‫can find on the Microsoft website, and you can find more details about the data types here.
‫But what we want to create is one variable for each of those data types, and also they need to have
‫the correct value.
‫All right.
‫So let's go ahead and check it out.
‫Let's start with Byte, then go ahead with SE byte, end and so forth.
‫And while I could show you how to type all of that in, I think it makes more sense to simply go through
‫the code and explain you what the reasoning was behind that.
‫So first of all, I have a byte which I called my byte and I assigned a value of 25 to it.
‫And as you might know, the value range for the byte is between zero and 255.
‫So I just took a random value out of those numbers and then I added it to my console by adding right
‫line.
‫So console dot red line and the name of the variable.
‫The same thing with the byte, which is just a short byte which can have negative values, but only
‫between minus -128 and 127.
‫Then we have the my int.
‫It's an integer which can have negative values and positive values, then the other end which can have
‫even larger values.
‫So just based on the range that you can find here and as you can see, it has a larger value.
‫The width is the same, so it's positive now.
‫So it only can be positive.
‫You can only be positive.
‫Then you have the short variable here and I took the lowest value possible for a short variable and
‫you can find that here or for a variable with the short data type, it's -32,768.
‫Then the you short is only positive and I took the highest value possible.
‫Then you have the float which can be negative and is a floating point number and it's important to have
‫the F at the end and it can be either a capital F or a non capitalized F.
‫Then I have my double, which is an even longer value in terms of even more digits behind the decimal
‫point.
‫Then I have a character which is a capital A in my case, which is simple, simply one single character.
‫And as you can see, I had to use apostrophes here.
‫Then we have a boolean which can either be true or false and it shows true.
‫Then my text, which I told you to use, I control text.
‫And then finally we have a num text which is a number in form of a string.
‫And I chose the value 15 here and I used parse in order to create an integer out of this num text.
‫And here I used int dot parse to use that you could have used the n 32 dot parse as well.
‫So in the end it's the same thing.
‫It's just a different way of approaching it.
‫All right, then we have the console right line in order to write that text onto the console, which
‫is just this 15 in terms of an integer.
‫And then we read everything out.
‫So our console gets filled with all those values, which should be plenty, as you can see.
‫So more than ten different data types and that we are 25, 15 or -15 and so forth.
‫All right.
‫I hope you manage to do that.
‫It's not really that difficult, but it's more about just for you to get an understanding of the different
‫data types and what the range is and also understand how many bits they use and so forth.
‫That's something that will come in handy for further programming.
‫When you have to decide which data type you want to use for your variable, then you always can check
‫out the Microsoft website or you can go back to this lecture and check out what the values were and
‫understand a bit better what to choose.