Hello and welcome.
In this lecture we'll be looking at concatenation in C sharp.
We have used it in the course so far.
But you may not have noticed it so we're just going to go over it.
In this lecture what is concatenation concatenation basically means.
Joining things together you can join a text to a variable or you can join two or more variables together
to make a longer string or text.
OK so when you think of the word concatenation just bear in mind that it means joining things together.
So here is some code here with an example of code.
Captain nation in action.
So we've got a couple of variables here.
We got a variable on line 19 called first name and another variable on line 20 called last name.
These variables have got the string data type.
Line 22.
We've got another variable called result.
And with that we use some concatenation here with these variables.
So we've had a text that's a tax here plus we this you use the plus operator to add strings together
in a concatenation operation.
So here this is a first we add in this text low to the first name and then we're adding a space and
then we add in the last name.
So let's see this in action.
So this is what that code is saying.
So when you type a naming and then the last name let's see this so this is a concatenation in progress.
So it's added the text hello to the first name value Rick is added this space here and then is added
the last name Williams.
So the process of adding things together or joining things together is known as concatenation which
is what we've done here and we've used the plus operator to achieve the concatenation.
So that is it for this lecture on concatenation.
Thank you for watching.
Bye for now.