1
00:00:00,570 --> 00:00:01,460
Hello and welcome.

2
00:00:01,470 --> 00:00:08,250
In this lecture we are going to learn about concatenate in list concatenation.

3
00:00:08,250 --> 00:00:12,570
Basically means adding together.

4
00:00:12,570 --> 00:00:17,590
So I am going to quickly just create another list here.

5
00:00:17,790 --> 00:00:21,450
I'm going to create a list called vegetables

6
00:00:23,880 --> 00:00:31,190
so to save time I've just copied this list here and I'm just going to change the name Sarge changed

7
00:00:31,210 --> 00:00:33,660
up from fruits to vegetables

8
00:00:39,240 --> 00:00:45,350
please note that the names you gave to your list are case sensitive.

9
00:00:45,390 --> 00:00:54,120
I've used all lowercase here for vegetables so if I try and use an upper case it will not work.

10
00:00:54,120 --> 00:01:02,970
And then I have to change hair stand up from fruits to vegetables.

11
00:01:03,360 --> 00:01:05,730
Okay.

12
00:01:05,900 --> 00:01:11,810
The same thing here.

13
00:01:17,500 --> 00:01:18,290
Okay.

14
00:01:18,510 --> 00:01:21,210
So I just need to change the name of the vegetables

15
00:01:28,670 --> 00:01:34,290
so I add I'll say carrots.

16
00:01:35,190 --> 00:01:37,340
Call me and say

17
00:01:44,840 --> 00:01:48,890
corn or tomato

18
00:01:54,210 --> 00:01:56,570
okay.

19
00:01:56,870 --> 00:01:58,950
So I now have to list.

20
00:01:59,160 --> 00:02:01,110
First one is called a fruit.

21
00:02:01,130 --> 00:02:04,220
Second is called vegetable.

22
00:02:04,220 --> 00:02:08,580
So to concatenate both lists that means to add the list together.

23
00:02:08,900 --> 00:02:13,680
We use what is what is called an add range.

24
00:02:13,760 --> 00:02:24,110
So to do that to add them together will going to add the this vegetable is going to add that to the

25
00:02:24,110 --> 00:02:25,350
fruits.

26
00:02:25,370 --> 00:02:27,530
So what I do a time period fruits

27
00:02:31,010 --> 00:02:40,800
followed by and this is what we used to do the concatenation add range and then in parentheses we pass

28
00:02:40,810 --> 00:02:45,170
in the name of the other list which is vegetables

29
00:02:48,510 --> 00:02:53,040
okay and just put a semicolon at the end there.

30
00:02:53,040 --> 00:02:53,410
All right.

31
00:02:53,430 --> 00:03:02,730
So we are adding You didn't add range method we add in the vegetable list to the fruit list.

32
00:03:02,730 --> 00:03:12,560
So if I do a console the right line on the fruit count I expected to have a count of six.

33
00:03:13,170 --> 00:03:14,120
OK.

34
00:03:14,280 --> 00:03:23,490
Because I've got four listed for fruits and two listed for four vegetables.

35
00:03:23,480 --> 00:03:29,560
So let's give that a go click start and see what comes up with.

36
00:03:30,240 --> 00:03:33,900
If you walks out I should expect a count of six.

37
00:03:33,900 --> 00:03:35,690
There he goes who has walked out.

38
00:03:35,700 --> 00:03:41,220
So we have a count of six so the concatenation has been successful.

39
00:03:42,570 --> 00:03:50,460
So you can try experimenting yourself try and create a couple of lists yourself and then try and concatenate

40
00:03:50,670 --> 00:03:50,870
them.

41
00:03:51,510 --> 00:03:56,880
So that's it for this lecture on C sharp list concatenation.

42
00:03:56,940 --> 00:03:58,250
Thank you for watching.

43
00:03:58,260 --> 00:03:58,810
Bye for now.
