1
00:00:00,690 --> 00:00:01,690
Hello and welcome.

2
00:00:01,710 --> 00:00:07,260
In this lecture we'll be looking at concatenation in C sharp.

3
00:00:07,260 --> 00:00:11,890
We have used it in the course so far.

4
00:00:11,910 --> 00:00:15,750
But you may not have noticed it so we're just going to go over it.

5
00:00:15,750 --> 00:00:23,810
In this lecture what is concatenation concatenation basically means.

6
00:00:23,820 --> 00:00:33,150
Joining things together you can join a text to a variable or you can join two or more variables together

7
00:00:33,600 --> 00:00:37,620
to make a longer string or text.

8
00:00:37,650 --> 00:00:46,170
OK so when you think of the word concatenation just bear in mind that it means joining things together.

9
00:00:47,880 --> 00:00:52,640
So here is some code here with an example of code.

10
00:00:52,740 --> 00:00:55,950
Captain nation in action.

11
00:00:55,950 --> 00:00:58,520
So we've got a couple of variables here.

12
00:00:58,530 --> 00:01:05,630
We got a variable on line 19 called first name and another variable on line 20 called last name.

13
00:01:05,670 --> 00:01:09,600
These variables have got the string data type.

14
00:01:09,600 --> 00:01:11,390
Line 22.

15
00:01:11,400 --> 00:01:14,120
We've got another variable called result.

16
00:01:14,940 --> 00:01:20,770
And with that we use some concatenation here with these variables.

17
00:01:22,470 --> 00:01:34,720
So we've had a text that's a tax here plus we this you use the plus operator to add strings together

18
00:01:35,230 --> 00:01:37,440
in a concatenation operation.

19
00:01:37,930 --> 00:01:49,910
So here this is a first we add in this text low to the first name and then we're adding a space and

20
00:01:49,930 --> 00:01:52,120
then we add in the last name.

21
00:01:52,630 --> 00:01:54,900
So let's see this in action.

22
00:01:54,910 --> 00:01:57,830
So this is what that code is saying.

23
00:01:57,880 --> 00:02:09,270
So when you type a naming and then the last name let's see this so this is a concatenation in progress.

24
00:02:09,700 --> 00:02:20,590
So it's added the text hello to the first name value Rick is added this space here and then is added

25
00:02:20,980 --> 00:02:23,290
the last name Williams.

26
00:02:23,380 --> 00:02:31,030
So the process of adding things together or joining things together is known as concatenation which

27
00:02:31,030 --> 00:02:41,680
is what we've done here and we've used the plus operator to achieve the concatenation.

28
00:02:41,830 --> 00:02:46,570
So that is it for this lecture on concatenation.

29
00:02:46,600 --> 00:02:48,220
Thank you for watching.

30
00:02:48,220 --> 00:02:48,820
Bye for now.
