‫Welcome back.
‫And this video we are going to cover string and string is used for text.
‫So I showed you how to use string in one of the earlier videos and we use string as a capital letter
‫in order to get the class system string.
‫So we have a variable of type string and I'm going to call it my name and it's equal to Dennis, for
‫example.
‫Now you can use string with a capital letter, which is the class, or you could use string with a small
‫letter and the coding standard is to use a small letter.
‫So uncapitalized.
‫SW All right, so now let's go ahead and have a look at what we can do with strings.
‫We can, for example, print them out onto the console.
‫So write line or write right red line here.
‫And I'm going to enter my name and I'm going to simply read that.
‫So read and let's go ahead and start that.
‫And then it says, Dennis, we can use concatenation with strings.
‫So for example, instead of just writing Dennis, I could say something like my name is and then plus
‫the string, so you can add strings to each other, which means concatenation.
‫So which is called concatenation, which means you simply add strings up to be one string.
‫So that would be one whole string here, which is called My name is my name.
‫Or you could even go ahead and create a new string and call it message.
‫And it's going to be my name is
‫plus my name.
‫So you could go ahead like that as well and simply replace that statement with message.
‫So if I run that.
‫I get.
‫My name is Dennis.
‫And String is written with a small letter here, but as you can see, it's from the class system dot
‫string.
‫So within the system namespace there is a class called string and that class has multiple methods and
‫whenever we use it for variables, the coding standard is to use a small capital string.
‫But the class itself, as I said earlier, is a string.
‫But at the same time, what we can do now is, for example, with our message we can still use the string
‫class methods.
‫So the string has multiple methods and properties very similarly to what we have seen with console.
‫So we had seen that console actually have to get rid of that.
‫So console dot and as you can see there are plenty of properties, events and methods and the same thing
‫goes for strings.
‫So the message is of type string.
‫So now I can use the string methods onto that variable so I can for example, go to two upper.
‫I can use the two upper method which returns a copy of the string converted to uppercase.
‫So I'm just going to do that real quick.
‫And in order to store that somewhere, I need to create a new string.
‫So I'm going to call it caps.
‫Message is equal to message to upper.
‫And now let's return to Cap's message here, or let's write the Caps message onto our console, just
‫so you know what it does.
‫So there you are.
‫My name is Dennis and all in caps.
‫So that's what we can do with some of the string methods.
‫So there are plenty of other string methods.
‫So please go ahead and just check out some.
‫For example, please go ahead and create a new variable which is of type string and make it so that
‫the message is all with lowercase letters and then also print it out on the console.
‫All right.
‫I hope you tried it.
‫String lower case message is message dot two lower.
‫And now let's print it out.
‫A lower case message.
‫Let's write it onto our console.
‫And as you can see, my name is Dennis, all with lowercase.
‫All right.
‫So now you have seen how you can create strings, how you can use strings, and you have seen that there
‫are multiple methods that you can use and there are plenty more which we will use along the way.
‫But for now I think that's a good start.
‫And in the next video, we are going to have a look at naming conventions.
‫So see you there.