1 00:00:00,600 --> 00:00:01,590 ‫Welcome back. 2 00:00:01,620 --> 00:00:06,890 ‫In this chapter, we are going to cover object oriented programming in C sharp. 3 00:00:06,900 --> 00:00:12,840 ‫So far, we have only worked in one class and that was our first main class with the main method. 4 00:00:12,840 --> 00:00:17,310 ‫And we didn't do any real object oriented programming in that sense. 5 00:00:17,310 --> 00:00:23,550 ‫And in this video, I'm going to show you a little glimpse of what's going to happen in the next chapter. 6 00:00:23,550 --> 00:00:27,150 ‫So let's go ahead and have a look at what a class is. 7 00:00:27,150 --> 00:00:33,720 ‫In general, a class is a blueprint of an object, and that's where this object oriented programming 8 00:00:33,720 --> 00:00:34,200 ‫comes from. 9 00:00:34,200 --> 00:00:40,050 ‫So pretty much you can create multiple objects of a specific class that you can create yourself. 10 00:00:40,050 --> 00:00:45,090 ‫And we even have used classes already, as you know, for example, the console class or the string 11 00:00:45,090 --> 00:00:46,770 ‫class and so forth. 12 00:00:47,070 --> 00:00:55,050 ‫Then a class has actions, abilities which are so called member functions or methods. 13 00:00:55,050 --> 00:00:59,910 ‫So we have used methods already from even those classes that we have seen. 14 00:00:59,910 --> 00:01:08,700 ‫So console for example, there were methods that we have used as read or read line, write line, those 15 00:01:08,700 --> 00:01:09,210 ‫kind of things. 16 00:01:09,210 --> 00:01:13,920 ‫So these were methods or so called member functions of that class. 17 00:01:14,250 --> 00:01:20,400 ‫Then it has properties, so called member variables such as length. 18 00:01:20,400 --> 00:01:27,840 ‫We have seen the length property of one class and that was our string class where we checked, how long 19 00:01:27,840 --> 00:01:28,800 ‫is the string? 20 00:01:28,800 --> 00:01:32,310 ‫And that was a property of that class. 21 00:01:32,310 --> 00:01:36,630 ‫So you can create multiple different properties and you can call them later on. 22 00:01:37,380 --> 00:01:45,180 ‫Then inheritance is possible with classes and we'll have a look at inheritance in a additional chapter 23 00:01:45,180 --> 00:01:48,780 ‫where we look into inheritance in more detail. 24 00:01:48,870 --> 00:01:56,220 ‫But now, just for you to know, it's possible to inherit classes and they can be used like a data type. 25 00:01:56,220 --> 00:02:01,320 ‫For example, a string is a class and we have used strings as data types. 26 00:02:02,520 --> 00:02:05,370 ‫All right, so next one is an object. 27 00:02:05,370 --> 00:02:06,420 ‫What is an object? 28 00:02:06,420 --> 00:02:09,300 ‫Well, you can create objects out of a class. 29 00:02:09,300 --> 00:02:13,020 ‫So as I said, it's a blueprint for an object, a class. 30 00:02:13,020 --> 00:02:17,310 ‫Now we see an object here, which is a car and it's an Audi. 31 00:02:17,310 --> 00:02:25,350 ‫And the properties of that car could be the horsepower, the amount of wheels, the lumen of the front 32 00:02:25,350 --> 00:02:29,280 ‫light, then the doors and many more properties. 33 00:02:29,460 --> 00:02:36,810 ‫Then the abilities would be to drive, to break, to open a window, make light and so forth, plenty 34 00:02:36,810 --> 00:02:37,680 ‫of abilities. 35 00:02:37,680 --> 00:02:40,320 ‫And then finally inheritance would work like that. 36 00:02:40,320 --> 00:02:43,770 ‫You have a car which inherits to Audi. 37 00:02:43,770 --> 00:02:46,980 ‫So an Audi is a car but has specifics. 38 00:02:46,980 --> 00:02:52,110 ‫Then an A5 is an Audi but has its own specifics and so forth. 39 00:02:52,110 --> 00:02:58,020 ‫So this is just a very brief introduction into object oriented programming and into classes. 40 00:02:58,020 --> 00:03:05,520 ‫And we're going to go into the demo where you will see all those things in action and get a better understanding 41 00:03:05,520 --> 00:03:09,690 ‫for what they do and what the purpose is and how we can use them. 42 00:03:10,110 --> 00:03:10,620 ‫All right. 43 00:03:10,620 --> 00:03:14,850 ‫So see you in the next video where we'll create our own class.