Repository navigation
C Programming Intermediate Lecture 1 Method Overriding Access Modifiers NonStatic Tuples
Full tutorial link > https://www.youtube.com/watch?v=1Gcoql5IIh8
C# Programming (Advanced/Intermediate) Lectures (1/14) will teach you #CSharp #programming from beginner to intermediate/expert level. This course is an excellent source to learn advanced concepts in C# #coding. If you are a beginner to C#, watch our previous course lectures. The playlist link of the previous course is below.
Full playlist of the previous course: C# For Beginners
https://www.youtube.com/playlist?list=PL_pbwdIyffskoSXySh0MdiayPJsBZ7m2o
Discord ➡️ https://bit.ly/SECoursesDiscord
Patreon ➡️ https://www.patreon.com/SECourses
Technology Playlist (30+ Tutorial / Guide / News / Review Videos)
https://www.youtube.com/playlist?list=PL_pbwdIyffsnkay6X91BWb9rrfLATUMr3
Stable Diffusion Playlist (30+ Tutorial / Guide Videos)
https://www.youtube.com/playlist?list=PL_pbwdIyffsmclLl0O144nQRnezKlNdx3
Please join discord, mention me and ask me any questions. Thank you for like, subscribe, share and Patreon support. I am open to private consulting with Patreon subscription.
Full playlist of this course
https://www.youtube.com/playlist?list=PL_pbwdIyffslHaBdS3RUW26RKzSjkl8m4
You can watch for free our C# Programming, ASP .NET Core MVC programming, Machine Learning and Software Engineering related courses on our playlists page
https://www.youtube.com/@SECourses/playlists
GitHub code repository of this course (source codes of the lectures)
https://github.com/FurkanGozukara/Introduction-to-Programming-2-2021
The topics that have been covered in Lecture 1:
-
How to write a method
-
What are the accessibility levels of methods, classes, etc.: private, protected, public, internal
-
The difference between static and non-static classes, methods, etc.
-
What is method overloading and how do write overloaded methods
-
Void and non-void method return types
-
What are tuples and how to utilize tuples
-
How to define a custom class with fields and properties
-
What is the difference between fields and properties of classes
-
How to compose a custom set and get method overriding having classes
Introduction:
Programming languages are a set of instructions that instruct a computer to perform a specific task. The most important aspect of programming is the ability to write code that is efficient, maintainable, and reusable. In this article, we will discuss the topics that were covered in Lecture 1. We will delve into the different aspects of writing methods, defining accessibility levels of methods and classes, understanding the difference between static and non-static classes and methods, method overloading, void and non-void method return types, tuples, defining custom classes, fields and properties of classes, and finally, we will learn how to compose a custom set and get method overriding having class.
How to write a method:
A method is a block of code that performs a specific task. Methods are used to organize code and make it more readable and reusable. To write a method, you need to define the method signature, which includes the access modifier, return type, method name, and parameters. The access modifier determines who can access the method. The return type specifies the type of data that the method returns. The method name is a unique identifier for the method. The parameters are inputs to the method that are used to perform the task.
Accessibility levels of methods, classes, etc.: private, protected, public, internal:
Accessibility levels determine who can access a class or method. There are four accessibility levels in C#: private, protected, public, and internal. Private members can only be accessed within the same class. Protected members can be accessed within the same class and its derived classes. Public members can be accessed from anywhere in the program. Internal members can be accessed from within the same assembly.
The difference between static and non-static classes, methods, etc.:
Static members belong to the class, while non-static members belong to the instance of the class. Static members can be accessed without creating an instance of the class. Non-static members require an instance of the class to be created before they can be accessed.
What is method overloading and how do write overloaded methods:
Method overloading is the process of defining multiple methods with the same name but different parameters. This allows you to perform the same task with different inputs. To write overloaded methods, you need to define the methods with the same name but different parameter lists.
Void and non-void method return types:
Void methods do not return a value, while non-void methods return a value of a specified type. Void methods are used to perform a task, while non-void methods are used to calculate a value.
What are tuples and how to utilize tuples:
Tuples are a data structure that allows you to store multiple values of different types in a single variable. Tuples are useful when you need to return multiple values from a method or store multiple values in a collecti
-
00:00:00 Hello, dear students, welcome to the lecture 1 of Introduction to Programming 2.
-
00:00:05 This course was named previously as Advanced Programming.
-
00:00:11 We are going to see this course with C-sharp.
-
00:00:14 So therefore, you have to have basic knowledge about programming with C-sharp.
-
00:00:22 If you don't have, you can see our Introduction to Programming course, material here, Introduction
-
00:00:30 to Programming 2020 and also you can watch our Introduction to Programming course.
-
00:00:39 Video series on our YouTube, channel.
-
00:00:42 Our YouTube channel name is SECourses, Software Engineering Courses and on the playlist.
-
00:00:51 You can see our first semester lecture Introduction to Programming full course with C-sharp.
-
00:01:00 So if you don't have, if you don't know how to do programming, if you don't have the related
-
00:01:09 knowledge, you can watch all these 14 videos and then you can continue our Introduction
-
00:01:18 to Programming. 2 course.
-
00:01:22 The name change is coming from our department name change.
-
00:01:28 We were Software Engineering and we were Computer and Software Engineering.
-
00:01:36 Now we are only Software Engineering.
-
00:01:39 Therefore, we have made some course name changes.
-
00:01:43 However, it is same as previous Advanced Programming.
-
00:01:48 So don't get confused with the name Introduction to Programming and Introduction to Programming
-
00:01:54 2.
-
00:01:55 Okay.
-
00:01:56 So for those who doesn't know, I am posting all the course materials on GitHub.
-
00:02:06 So please follow my courses from GitHub and YouTube.
-
00:02:12 As for the LMS system of the school, I won't be using it a lot.
-
00:02:21 So everything will be posted on our GitHub repository here.
-
00:02:27 This is the URL of our GitHub repository and on our YouTube channel here SECourses.
-
00:02:38 I will compose a playlist for Introduction to Programming 2 as well.
-
00:02:45 So you can see our existing playlists here from the previous semester.
-
00:02:51 Okay.
-
00:02:52 As for the course, I will be using Visual Studio Community Edition latest version.
-
00:02:59 After a certain point: Microsoft, changed .NET Core name to .NET.
-
00:03:09 So, let's start with creating a new project.
-
00:03:14 Meanwhile, I will also compose our folder.
-
00:03:23 Ok 2021.
-
00:03:28 All right, so we will be using WPF .NET and Console .NET.
-
00:03:40 You see WPF .NET is actually WPF .NET Core, but it is now named as WPF .NET and the classical
-
00:03:49 .NET is named as .NET framework.
-
00:03:53 As for developing applications, there isn't much differences.
-
00:03:56 However, .NET Core now named as .NET is newer version and it will be used from now on.
-
00:04:08 It will be developed further.
-
00:04:10 It is the newest technology, it is better.
-
00:04:14 So, let's start with composing our first application.
-
00:04:20 We have selected our folder and I am going to name it as Lecture 1.
-
00:04:27 Now composing the project.
-
00:04:30 It is WPF .NET previously known, as .NET Core, so don't get confused.
-
00:04:40 If you also install the newest Microsoft Visual Studio Community Edition and update it to
-
00:04:47 latest version, you will also see the naming as that as well.
-
00:04:55 I will show you my version here.
-
00:05:00 So you see it is this version 16.8.6.
-
00:05:09 Now it is building our application.
-
00:05:16 As for the first lecture, we will start with some
-
00:05:28 remembering of the previous semester.
-
00:05:34 How we were able to write method.
-
00:05:39 First, we define the return type of the method.
-
00:05:43 It can be void or it can be any parameter.
-
00:05:47 So this will be a void method and before it we can define it is static or not.
-
00:05:56 It is static, or instance, method.
-
00:06:00 So let's write several methods and see all of them.
-
00:06:04 Then after we define the return type, we write the name of the method such as method_1.
-
00:06:17 Then we write the constructor of the method, and here we define the input parameters.
-
00:06:27 It is also defining the signature of the method such as int, param1 and, let's say double
-
00:06:37 param2.
-
00:06:38 Then we open and close the curly brackets like this.
-
00:06:45 And one more thing there is: it is private or public or protected.
-
00:06:54 So this is private static method.
-
00:06:56 Private means that it can be only accessed by the methods under same parent class.
-
00:07:08 So what is the parent class of this method?
-
00:07:13 It is this one.
-
00:07:14 It is the Main Window class which is inheriting from Window class.
-
00:07:22 We will see about inheritance in the next semester, but I may also explain in this semester
-
00:07:29 as well.
-
00:07:31 By the way you can also watch the next year's course, which is Object Oriented Programming.
-
00:07:39 Here.
-
00:07:41 It can be also useful for you, but we will see that in the next semester as well.
-
00:07:49 It is the course of the second year at the university.
-
00:07:54 So private means that it can be only accessed by the methods under same parent class.
-
00:07:58 So, let's define another method.
-
00:08:01 This time, let's make it protected method2.
-
00:08:06 So you see when I define it like this.
-
00:08:11 It is throwing me an error because same name method exists with same signature.
-
00:08:19 However, if I add here something else, it would work but don't get confused right now.
-
00:08:26 So we will see about method signatures later.
-
00:08:30 So let's call this as method2.
-
00:08:34 Protected means they can be only accessed by.
-
00:08:39 If I remember correctly it is same dll.
-
00:08:46 But let's remember: oh, it was not protected, but it was the other one.
-
00:09:04 Okay.
-
00:09:05 So I was remembering incorrectly.
-
00:09:10 Okay, let's write it like this.
-
00:09:13 I think I will copy and paste this.
-
00:09:29 Okay, so protected means can only be accessed from within the same parent class.
-
00:09:41 Here main window and any object that inherits of the class.
-
00:09:46 Okay.
-
00:09:47 So when we come to part inheritance, we will see that.
-
00:09:51 So if I compose another class which inherits main window, I can access the protected method.
-
00:09:59 I can access the public method, but I cannot access private method.
-
00:10:03 Private method can only be accessed within the same parent class.
-
00:10:10 And then we have public okay.
-
00:10:12 Now then we will see the initial instance, or instance instantiable classes.
-
00:10:28 I think it's hard to pronounce.
-
00:10:30 So when I make it like this now, I have to have an instance of this method.
-
00:10:40 How can I have instance of a method?
-
00:10:43 You can have instance of a method by composing an object from its parent class.
-
00:10:52 Okay, so let's say I have another class here.
-
00:10:59 I will add it.
-
00:11:03 Okay, let's name it, as instance, example.
-
00:11:08 Okay, now I can access the static and public methods of main window.
-
00:11:17 Let me show you: Okay, let's make it private.
-
00:11:22 Let's make this return type having.
-
00:11:25 So this will return an integer value.
-
00:11:33 method_11.
-
00:11:34 Okay, now let me show you what I can access.
-
00:11:39 So from main window.
-
00:11:40 I can access method.
-
00:11:42 3.
-
00:11:43 Okay, why only method 3, Because method 3 is static and public.
-
00:11:51 Therefore I can access it like this.
-
00:11:54 However, I cannot access the other methods.
-
00:11:57 This is.
-
00:11:59 Method 4 is also public, but I am not able to access it.
-
00:12:03 Do you know why?
-
00:12:04 By the way method 3 is taking two parameters, so, therefore, I will give them 0 and 0 like
-
00:12:13 this.
-
00:12:15 Okay.
-
00:12:16 So if I want to access by the way it has this one also has to return something, so it will
-
00:12:22 return 0 in this case.
-
00:12:24 If I want to access method 4, what do I need to do?
-
00:12:30 To be able to access method 4 I have to define an instance of main window like this.
-
00:12:38 myAnotherWindow = new MainWindow().
-
00:12:45 Now I have an instance of MainWindow class.
-
00:12:56 You have to have instances of non-static classes and
-
00:13:10 methods to be able to use them.
-
00:13:15 Okay.
-
00:13:16 Now I can access method 4 of MainWindow class.
-
00:13:27 So to be able to understand this, you should practice.
-
00:13:33 So this is what is about static and non-static.
-
00:13:37 To use non-static methods.
-
00:13:41 You have to have instance of the class that has that method.
-
00:13:51 Okay or same rule applies to methods, classes and other objects.
-
00:13:57 So here basically we have created an object of MainWindow class.
-
00:14:02 We have composed an object of MainWindow class and then we can access the non-static methods.
-
00:14:10 However, they have to be protected.
-
00:14:13 I mean public non-static methods of that class as well.
-
00:14:20 I can still.
-
00:14:21 When we check you see method 3 is not available because method 3 is not instance having method,
-
00:14:33 it is a static.
-
00:14:34 Therefore, I cannot call method 3 of this instance.
-
00:14:38 However, I can call it directly as MainWindow class like here.
-
00:14:48 Let me show you like here.
-
00:14:50 Even though MainWindow is not a static class, the .NET handles that part and make its static
-
00:15:00 methods available to us.
-
00:15:03 Okay.
-
00:15:04 This is a good thing, and now we have remembered what are public, protected private, what are
-
00:15:13 static and not and what is void and return type having methods such as it can return
-
00:15:22 anything any class.
-
00:15:24 Let's show, let me show you an example.
-
00:15:26 So I will define a class here, let's name it as Car class.
-
00:15:33 Okay, this is a classical example class Car.
-
00:15:41 So class Car is by default private and these methods now can return Car type.
-
00:15:49 Okay, so for it to work, I have to compose a Car type object.
-
00:15:54 My object, let's say my Car = new Car() and return my car.
-
00:16:05 Okay, and now this method will work.
-
00:16:11 However, I have to change its name because its signature is same as previous.
-
00:16:19 So, let's see about signatures as well.
-
00:16:27 Okay, so there is an inconsistent accessibility.
-
00:16:36 So this method is public.
-
00:16:39 However, this class is private.
-
00:16:41 Therefore, .NET is telling us that you have inconsistent accessibility Either I have to
-
00:16:48 make this public or I have to make this private.
-
00:16:52 So let's make this private first.
-
00:16:54 Now it works as expected.
-
00:16:58 However, now I have to change its signature, so the signature of this method is integer
-
00:17:08 and double.
-
00:17:09 Does the order matter?
-
00:17:11 Let's see.
-
00:17:14 So if I make it double and integer now it works because signatures of this method is
-
00:17:24 double and integer.
-
00:17:26 This is also called as method overloading.
-
00:17:30 Different signatures having same named methods, or, let's say, let's put it differently.
-
00:17:45 If you define define methods with same name but different signatures, it is called as
-
00:17:57 method overloading.
-
00:18:00 Let's find the formal definition.
-
00:18:09 Okay, with method overloading multiple methods can have the same name with different parameters.
-
00:18:20 This is not much formal definition.
-
00:18:23 Okay, let's read this definition.
-
00:18:28 Method Overloading is the common way of implementing polymorphism.
-
00:18:31 It is the ability to redefine a function in more than one form.
-
00:18:36 A user can implement function overloading by defining two or more functions in a class
-
00:18:41 sharing the same name.
-
00:18:43 C# can distinguish the methods with different method signatures.
-
00:18:47 i.e. the methods can have the same name but with different parameters list (i.e. the number
-
00:18:52 of the parameters, order of the parameters, and data types of the parameters) within the
-
00:18:56 same class.
-
00:18:58 Okay.
-
00:18:59 So this is the description.
-
00:19:03 Let's read it: more.
-
00:19:10 Overloaded methods are differentiated based on the number and type of the parameters passed
-
00:19:14 as arguments to the methods.
-
00:19:16 You can not define more than one method with the same name, order and the type of the arguments.
-
00:19:22 It would be compiler error.
-
00:19:24 The compiler does not consider the return type while differentiating the overloaded
-
00:19:28 method.
-
00:19:29 But you cannot declare two methods with the same signature and different return type.
-
00:19:35 It will throw a compile-time error.
-
00:19:37 If both methods have the same parameter types, but different return type, then it is not
-
00:19:42 possible.
-
00:19:43 Okay, why do we need?
-
00:19:45 There are so many useful areas of method overloading.
-
00:19:51 Why do we need Method Overloading?
-
00:19:53 If we need to do the same kind of the operation in different ways i.e. for different inputs.
-
00:19:59 In the example described below, we are doing the addition operation for different inputs.
-
00:20:04 It is hard to find many different meaningful names for single action.
-
00:20:09 Different ways of doing overloading methods- Method overloading can be done by changing:
-
00:20:13 The number of parameters in two methods.
-
00:20:16 The data types of the parameters of methods.
-
00:20:19 The Order of the parameters of methods.
-
00:20:23 Okay.
-
00:20:24 So, let's make several examples of method overloading.
-
00:20:29 I will make.
-
00:20:32 I will start with adding a new class method overloading okay, I will make this class static
-
00:20:47 and I will make it also public.
-
00:20:49 So, therefore, I can access it from everywhere within my application, and then I will start
-
00:20:56 writing public static methods add okay.
-
00:21:03 Public static add always return double so the first, let's name it as add.
-
00:21:11 So the first method will take double x and it will return x, plus x.
-
00:21:22 Okay, then, the second one will take double x and int y.
-
00:21:32 So it will return x and y and it will return double as well.
-
00:21:38 So I will write another one as integer, but you see this time.
-
00:21:46 It will throw me an error, because the return type doesn't matter.
-
00:21:52 Okay, and also you cannot directly sum double and integer.
-
00:22:04 However, when I change it integer integer now it works as you can see.
-
00:22:11 So I can write another one like this, and now it can use integer y and double x.
-
00:22:20 You see it is still working, because now the order is different and all have the same name.
-
00:22:28 I can define so many different methods like this.
-
00:22:35 This can also have something like this, or this can have like this.
-
00:22:41 You see with the same method name, you can define different methods.
-
00:22:47 However, the key point is their signatures.
-
00:22:50 So the signature is double okay.
-
00:22:59 Signature is double plus integer.
-
00:23:03 Okay, then the signature is integer plus integer signature is integer plus double, so you see
-
00:23:16 the order matters and the parameter type matters and nothing else matters.
-
00:23:22 So the name so the return type or accessibility level or the static or non-static doesn't
-
00:23:30 matter.
-
00:23:31 What matter is the input parameters and their order.
-
00:23:38 I will write this link to here.
-
00:23:50 Input types and input type input, types, orders; okay.
-
00:23:59 So, so far what we have seen - let's note them.
-
00:24:14 Okay, one moment: okay, lecture one: how how to write a method?
-
00:24:41 What are the accessibility levels of methods, classes, etc. and okay, the last one is internal.
-
00:25:00 I remembered it.
-
00:25:03 Let me fix it: okay, so private, protected, public and internal okay, so the last accessibility
-
00:25:17 level is internal.
-
00:25:20 I can make it something like this and I have to change it, so, let's make it double double
-
00:25:32 okay.
-
00:25:34 So there is also internal accessibility modifier.
-
00:25:42 Internal means that you can access this method within this application.
-
00:25:49 Within this DLL.
-
00:25:52 I can export my application as DLL, and then every method inside that DLL can access it.
-
00:26:04 If I remember correctly so so, what is internal access modifier?
-
00:26:13 Let's remember it: okay, internal modifier.
-
00:26:23 Let's read it!
-
00:26:29 The internal keyword is an access modifier for types and type members.
-
00:26:34 We can declare a class as internal or its member as internal.
-
00:26:38 Internal members are accessible only within files in the same assembly (.dll).
-
00:26:44 In other words, access is limited exclusively to classes defined within the current project
-
00:26:49 assembly.
-
00:26:50 Okay, so accessibility.
-
00:26:55 Accessibility: In same assembly (public).
-
00:26:58 Can be accessed by objects of the class.
-
00:27:01 Can be accessed by derived classes.
-
00:27:03 In other assembly (internal) . Cannot be accessed by object.
-
00:27:07 Cannot be accessed by derived classes.
-
00:27:10 Okay, so these are the access levels.
-
00:27:17 I think I can put this link into the application.
-
00:27:30 Let's put it somewhere here, all right, so what else did we show so far?
-
00:28:00 Initialize?
-
00:28:03 Okay.
-
00:28:05 The difference of static and non-static classes, methods, etc.
-
00:28:13 Okay, I think this is clear: okay method, overloading: okay, okay, okay, so let's say
-
00:28:53 you want to return multiple parameters.
-
00:28:56 Can we define a method?
-
00:28:59 Something like this?
-
00:29:01 Let me show you.
-
00:29:07 Let's say: public, integer, double, and string.
-
00:29:18 My awesome methods.
-
00:29:22 Can I write a method like this?
-
00:29:28 No, you cannot return multiple type, multiple elements from a method.
-
00:29:38 So how can I solve this problem solve this issue?
-
00:29:41 How can I return multiple different types of objects from a method?
-
00:29:48 There are several ways, so let me show you each one of them.
-
00:29:55 Okay, let's comment this out.
-
00:29:59 Okay, this kind of return definition definition of methods are not possible.
-
00:30:14 Okay, so let's say I want to return integer, double and string from my method.
-
00:30:22 What can I do?
-
00:30:23 I can use tuple.
-
00:30:26 So what is a tuple?
-
00:30:28 Tuple means that tuple is a type that can hold different, multiple types.
-
00:30:37 So first solution is Tuple.
-
00:30:39 It is so easy to implement, so I want to return, integer, double and string.
-
00:30:48 This is kind of a list.
-
00:30:50 However, it returns single object with the number of elements you have defined, so this
-
00:30:58 can return new tuple and when I define new tuples, let's say integer and double and "result"
-
00:31:11 or, let's say, "awesome", okay.
-
00:31:17 So when you define new tuple, you have to define it with like this.
-
00:31:21 Okay, so this is a way of returning multiple different type of parameters.
-
00:31:29 This is the first way, let's see the formal definition of Tuples okay.
-
00:31:54 So, let's see the formal definition of tuple.
-
00:32:05 C# - Tuple: The Tuple<T> class was introduced in .NET Framework 4.0.
-
00:32:14 A tuple is a data structure that contains a sequence of elements of different data types.
-
00:32:19 It can be used where you want to have a data structure to hold an object with properties,
-
00:32:24 but you don't want to create a separate type for it.
-
00:32:28 Okay, so usually you can define a tuple with seven objects and the rest.
-
00:32:36 Okay, an example is here, and so the rest also can get more items but to access the
-
00:32:49 rest items.
-
00:32:50 You define it like this.
-
00:32:53 There are also nested tuples, you see.
-
00:32:56 For the rest, you can create another tuple like this and another tuple like this.
-
00:33:02 So this is nested tuples.
-
00:33:04 Okay, I will leave this as a description and now, let's see our Tuple example.
-
00:33:14 Okay.
-
00:33:16 So how can I use this Tuple?
-
00:33:20 So, let's make an example usage of tuple, okay.
-
00:33:31 I have dragged and dropped a ListBox, so it is now taking my entire space on my WPF window.
-
00:33:42 Therefore, first I define an height like this okay.
-
00:33:47 Now it is more visible.
-
00:33:48 Now I can resize it as I want.
-
00:33:54 Okay, now add a button for Tuple example.
-
00:34:11 Ok, Tuple Example.
-
00:34:21 Okay, I will copy and paste the examples here.
-
00:34:29 Okay, something like this maybe.
-
00:34:37 When I double click the button, it composes the background, click event of the button.
-
00:34:43 You can also see the click event of the button on its XAML code.
-
00:34:48 Here you see, it is defined like this.
-
00:34:52 So the WPF runs with the WPF interface runs on XAML here, and there is also code behind
-
00:35:02 okay.
-
00:35:06 So first I will get a Tuple of my awesome method.
-
00:35:18 Return will be equal to my awesome method like this now then I will access and add elements
-
00:35:30 to my listbox.
-
00:35:33 How am I going to do that?
-
00:35:34 Let's give a name to my listbox first.
-
00:35:37 You have to give a unique name to your interface objects first.
-
00:35:44 Then you can access them in the code behind okay, I will name it as listbox1 items add
-
00:36:02 so I will use uh, auto format with dollar and so, let's say item one will be equal to
-
00:36:13 my awesome Tuple method, return, dot item one.
-
00:36:19 Then item two will be equal to item two and item three will be equal to item three okay.
-
00:36:40 Let's run the application and see so you can access the elements of Tuple with like this.
-
00:36:46 So you see there is no unique names.
-
00:36:49 You have to access them as Item1, Item2, Item3.
-
00:36:53 Therefore, I would say it is not that much useful explanative.
-
00:36:58 However, there can be useful scenarios for Tuples.
-
00:37:05 Okay, it is working okay.
-
00:37:11 So let's write eight or nine items having a tuple to do that I will copy and paste it
-
00:37:31 oh, so this is inline definition: okay, let's write it and this time it will return a string.
-
00:37:59 Okay and integers integer string, integer double okay.
-
00:38:05 I can put here string and another integer and string and integer integer.
-
00:38:18 Okay, you see it is showing me that this integer is the seventh element of the tuple.
-
00:38:29 Then it becomes rest.
-
00:38:31 So, let's make it like this.
-
00:38:35 Okay, so you see it is giving me an error.
-
00:38:39 Why?
-
00:38:40 Because the rest can only be one item.
-
00:38:44 Okay, therefore, after the rest, you cannot continue.
-
00:38:50 So the rest can be like list integer, okay, it can be like this, so I will name this as
-
00:39:04 like this and return new.
-
00:39:09 It will automatically type me the return type as the like this, then I can type my parameters,
-
00:39:20 the first item string, let's say string1, then integers like this: let's make it 101
-
00:39:34 double like this and string two like this, then, another integer, then another string.
-
00:39:50 Three another integer: let's make it something like this and new list.
-
00:39:59 Okay and the list can be infinitely anything if you want.
-
00:40:05 List one list, two list: three: okay, okay, so it will return this, and oh, this is the
-
00:40:22 integer list, so I will make the string list.
-
00:40:29 Can I iterate over the return elements of my tuple?
-
00:40:41 Let's try it for each and I will call my method inside for each method.
-
00:40:50 Okay, so it says that for each statement cannot operate on variables of type tuple, let's
-
00:41:00 check it.
-
00:41:01 If it is possible tuple.
-
00:41:13 Okay, there is no easy way, so I will just give up on that and now I can add my awesome
-
00:41:39 tuple 2 like this.
-
00:41:41 So you get the idea of the t.
-
00:41:42 Rest t rest can only be one item, but it can be list.
-
00:41:47 It can be another tuple, it can be anything you want.
-
00:41:50 Okay, so item, one item, two item three, and like this I can add, item four.
-
00:42:00 Okay, you get the idea of tuple and I can add, item five.
-
00:42:18 Oh, I have to change variable name.
-
00:42:36 I can access.
-
00:42:37 The item rest like this: let's name it as t rest and to use it.
-
00:42:46 I will use the rest index two.
-
00:42:52 Okay and it will be item or it is named as rest and since rest is list string.
-
00:43:09 So you see, it is showing me the rest, I'll access, the second item: okay
-
00:43:28 and okay.
-
00:43:34 So it says that the last element of an eight-element - tuple - must be a tuple, so we cannot put
-
00:43:43 a list as the eighth element.
-
00:43:48 Therefore, I will move this list as seventh element like this, and I will make the last
-
00:44:03 element as any generic tuple.
-
00:44:07 It says, so it can be like string, string, okay, and, of course, this will change.
-
00:44:24 list string, integer, okay string, integer, double, string, integer, and then another
-
00:44:39 integer, and then this string, okay, and then we will need a tuple.
-
00:44:48 When I say new, it doesn't automatically complete.
-
00:44:58 Let's make type this automatically: okay and okay and leave tuple.
-
00:45:14 Okay, now automatically completes tuple x1 tuple x, x2.
-
00:45:25 Okay, now as for the x, I can now access it like this, and I can access the list element
-
00:45:40 like this.
-
00:45:48 Okay, you should give also better names.
-
00:45:53 I am just giving some random names right now.
-
00:45:56 They are not very definitive item seven and okay.
-
00:46:01 Now, let's rerun the application.
-
00:46:09 Tuples can be very useful and quick to write sometimes, but I would suggest you to use
-
00:46:17 classes, okay, working okay, so.
-
00:46:23 So this is the first way of returning multiple different type of elements, and the other
-
00:46:32 way would be something like this.
-
00:46:35 So I will write equivalent of this one as like this.
-
00:46:45 List object: okay, so.
-
00:46:50 It will be simply this object and now by the way when I when you use list, the new keywords
-
00:47:10 has to be starting with curly brackets and and it okay.
-
00:47:15 Now I can use this one as the tuple you see.
-
00:47:23 It is much more clear.
-
00:47:24 However, now, when you return it, you cannot know the return type.
-
00:47:31 What I mean is, for example, when I type like this, there is nothing.
-
00:47:37 So what can I do?
-
00:47:39 I can access it like this.
-
00:47:42 However, now I don't know the type of the first object.
-
00:47:48 It is string, therefore.
-
00:47:52 What can I do is I can explicitly write the types okay, so it is sitting the second one
-
00:48:03 is integer.
-
00:48:08 It can be double as well.
-
00:48:09 It is up to you, okay, I will write it as integer and the third item is double.
-
00:48:25 Okay, double and the fourth item is okay, another string, and then I will write the
-
00:48:43 second element of the list as it is a list, as you can see here, it is the zero one, two
-
00:48:53 three four five sixth index.
-
00:48:58 You know that the arrays and index the index of arrays starts from zero in c sharp.
-
00:49:07 Then I will access its index like this.
-
00:49:12 However, to be able to access it, I have to convert it as string list and then I have
-
00:49:24 to put another parenthesis I believe.
-
00:49:29 Okay, so you see it becomes much much complex here and the same rule will apply on this
-
00:49:37 one as well.
-
00:49:39 Okay, so this will be a tuple.
-
00:49:42 This is a bad programming, but to be able to show you, I am doing it as an example,
-
00:49:53 but this is a bad programming.
-
00:49:55 Believe me, and this will be the one okay.
-
00:50:13 We have some problem with that.
-
00:50:21 Okay, here, okay, now you see.
-
00:50:31 Oh, it says that it cannot convert object.
-
00:50:37 Oh, I know the reason.
-
00:50:40 I know the reason, because I have to define the index of the item, which is seven.
-
00:50:46 Okay.
-
00:50:47 Now you see, we have written the both function, functionality in the different ways.
-
00:51:00 Now they are both working as expecting.
-
00:51:02 Now the third way would be defining a custom class, which would be my preferred way.
-
00:51:12 One moment: okay, so, the third and the proper way is defining a custom class with the desired
-
00:51:30 parameters.
-
00:51:31 So, let's define a public class and the class name our great class, okay uh, so which parameters
-
00:51:43 we need.
-
00:51:44 We need a string for that.
-
00:51:46 I will use prop tab tab and I will write it, a string and as our first string.
-
00:52:01 So what is the difference between get and set having string and this string?
-
00:52:13 Okay, so why?
-
00:52:17 Meanwhile, this is being a property.
-
00:52:20 This is just a field and there is a difference between fields and properties.
-
00:52:29 You can overload and change how the way properties works.
-
00:52:36 However, the fields are just fields: Okay, so um, let's see about the field and property
-
00:52:49 difference, so I will write this as custom property.
-
00:53:01 Okay and get will be set will be.
-
00:53:18 Let me show you, okay, okay, so for custom properties to work.
-
00:53:39 We have to keep a private variable like this, which will be only accessible within this
-
00:53:47 class, since this is private, it can be only accessed by the methods inside its parent
-
00:53:57 class, not from the parent of parent class.
-
00:54:01 Only the direct parent class can access private elements inside that class.
-
00:54:09 So, let's name it as property like this and this so when it returns the name, it will
-
00:54:21 append date time in front of the name like this and as our custom property, and when
-
00:54:35 we set the name or the property you see this is the get.
-
00:54:41 Get means that whenever you access, the property, it will call these methods.
-
00:54:48 This is actually a method.
-
00:54:49 Okay, and this is also set.
-
00:54:53 Whenever you set the property, it will be set like this.
-
00:54:59 I can make it equal to value, or we can make an addition to the value as such as to uppercase.
-
00:55:10 Okay and inside the upper okay.
-
00:55:15 Let's make it just upper okay, and I will show you the difference of get and set method.
-
00:55:23 Okay and what else we need, we need an integer.
-
00:55:31 I will make the integers first integer as field and the second integer as property.
-
00:55:39 So as for the field integer int ir1 by default, integer is zero and by default string is null
-
00:55:50 null by default.
-
00:55:58 Zero and then we have double, I will make the double as field one: okay by default double
-
00:56:11 is zero, and then we have the string one and string two first string, second string: let's
-
00:56:23 change this as firstInteger, okay, firstDouble and then we have the second Integer, so the
-
00:56:37 second integer will be a property as well, second integer, and to keep it private, int
-
00:56:50 second integer, and for get and set method.
-
00:56:55 Okay, like this, and okay, when we return the second integer, I will return 10 percent
-
00:57:07 of the integer and when I set it, I will set it as value plus five, okay uh.
-
00:57:21 So you will understand the difference and there is third integer.
-
00:57:26 So the third integer will be a by the way it has to be like this a default property
-
00:57:37 integer third integer, so it will have the default get and set and then first list.
-
00:57:49 It is a string first list and I have to initialize it like this, so it will be an empty string
-
00:57:58 list when I initialize any instance of this class.
-
00:58:02 This string list will be also initialized as empty list, so by default the list would
-
00:58:13 be null, and then finally, a tuple we have.
-
00:58:19 So public tuple string, string, and first tuple and okay.
-
00:58:37 I won't initialize, so it will be like this.
-
00:58:42 I won't initialize this as well.
-
00:58:44 I will let it by default null by default.
-
00:58:47 I think the tuples are also null, but let's, let's verify it.
-
00:59:00 Okay, now I will verify it with debug.
-
00:59:13 Okay.
-
00:59:14 So let's compose an instance of our class like this, and I will name it as like this
-
00:59:27 for or let's say, custom class, or actually, we can define a method and it can return our
-
00:59:37 custom class something like this private.
-
00:59:41 What is our class name?
-
00:59:48 It is our great class, so the return type is great class return great class, so it will
-
00:59:58 take nothing as parameters and it will return name our great class okay.
-
01:00:05 So this will return a default instance of the great class, something like this equal
-
01:00:16 to return great class.
-
01:00:19 So, let's see the default of my great class, I can use the var keyword as well, so the
-
01:00:27 var keyword is being an instance of you see under namespace lecture, one under main window
-
01:00:34 class.
-
01:00:35 It is our great class.
-
01:00:36 Okay, let's put a breakpoint here, and let's see the default values of our great class,
-
01:00:52 okay, okay, so by default, our class is null because classes are reference types and they
-
01:01:07 actually have no value by default.
-
01:01:09 Therefore, they are null.
-
01:01:11 We will see about reference types and such in future, and I move one step and now I can
-
01:01:19 see the default value, so you see second integer.
-
01:01:22 This is private.
-
01:01:25 Therefore, I can only see it in debug mode, but I cannot access it from anywhere.
-
01:01:31 It can be only accessed within side of this class okay.
-
01:01:38 So these are the private values you see zero and null then first double zero.
-
01:01:43 First integer zero first list null it's a list first tuple by default.
-
01:01:49 It is null, and these are the properties, as you can see so the custom property it is
-
01:01:57 by default a date time when we read it, even though our value is null and first string
-
01:02:06 null second string null third integer zero.
-
01:02:10 Now I will initialize my values, so how can I do that?
-
01:02:15 I can do that like this, you see first double and with a semicolon, I can define it something
-
01:02:27 like this or equal to yeah equal to then first integer will be 99 and first list will be
-
01:02:42 new.
-
01:02:43 I have to use new and initialize list as great list one and great list two etc. and then
-
01:02:59 first tuple equal to new tuple and let's name as tuple one and tuple two and then what else
-
01:03:19 we have second integer as 1000 and the custom property.
-
01:03:27 As let's name it as programming, and then we have first string first string, or let's
-
01:03:41 name it as school, and then we have second string second, and then we have the third
-
01:03:51 integer as like this.
-
01:03:53 You see now I can give sense making names to my variables, like first double: first
-
01:04:04 integer, first list whatever they are not item 1 item two item three or like here without
-
01:04:11 anything.
-
01:04:12 So when you define a custom class, it is the best way, and now I can add it to my list
-
01:04:22 box.
-
01:04:23 Let me show you how much better it will be much easier, better and readable.
-
01:04:29 When you write a code, your code has to be readable.
-
01:04:33 It is extremely important and okay, so, let's start.
-
01:04:42 So, our first variable will be let's say: second integer, you see, I can put any variable
-
01:04:55 with the name itself, so I will type this as second integer.
-
01:05:00 Then I will put a tab character or, let's put comma, then the another item will be let's
-
01:05:12 say: first list, okay, so first list second item so index one equal to like this.
-
01:05:27 This is the second item.
-
01:05:30 I can say also like second item.
-
01:05:35 Second object of first list: okay, by the way, if your list doesn't have two items,
-
01:05:46 then this code, this code would throw an error in the runtime.
-
01:05:53 Can we prevent it?
-
01:05:56 I think yes, we can prevent it with list overloading.
-
01:06:03 However, it is a more complex thing, so I don't know if there is a null check like this
-
01:06:15 yeah, let's try it.
-
01:06:17 I wonder if this will work, so we don't have 11 items.
-
01:06:21 Therefore, if this null check works, it should not throw an error.
-
01:06:28 Oh, it is throwing an error, so this null check is not working okay.
-
01:06:36 So what can we do?
-
01:06:42 Maybe this, but I'm not sure this would work.
-
01:06:51 Let's try that another way work not working as well session list index null check.
-
01:07:20 Okay, no easy way!
-
01:07:33 No easy way: maybe this can work, though, let's see ElementAtOrDefault.
-
01:07:41 I have never used ElementAtOrDefault.
-
01:07:55 Okay, oh here, okay, let's try like this, so I wonder what kind of result it will produce?
-
01:08:19 Probably it will be null.
-
01:08:24 I am assuming yes, it is not nice, so it didn't throw an error.
-
01:08:31 Therefore, with this way by default, it will be null because it is integers, it is string
-
01:08:39 list.
-
01:08:40 So, let's compose an integer list and let's name it as second list.
-
01:08:49 Okay, now, let's initialize the second list as a new list, and okay, okay, two, and okay.
-
01:09:23 I think these are still zero-based index and then to show you the meaning second list.
-
01:09:58 Now with now, we will see the difference of default values of string and integer.
-
01:10:20 Okay, so the second object of the first list is empty: okay, 11th object of the first list
-
01:10:40 I mean the second object of the first list is great list 2.
-
01:10:45 Let's see it if it is true, yes, great list 2, we can see it here.
-
01:10:50 This is the second object.
-
01:10:51 Eleventh object of the first list is.
-
01:10:54 Nothing, because when you convert null into the string, it becomes nothing empty character,
-
01:11:02 then the second object of the first list.
-
01:11:05 A second list is 12356, and we see it is true and the 11th object is zero, because the default
-
01:11:15 value of an integer is zero.
-
01:11:16 Meanwhile, the default value of the string is null okay.
-
01:11:21 It is working as expected.
-
01:11:24 Now, let's see our modified custom property: okay, to test it uh.
-
01:11:39 Let's change.
-
01:11:40 Let's add another line into our list, so the custom property is programming.
-
01:11:51 We set custom property string, expected or let's say given value or, let's say set value,
-
01:12:01 is programming, and let's see the output of the reading.
-
01:12:12 Okay.
-
01:12:16 So when we read it, what do we expect?
-
01:12:20 We have set programming as value and when we check our code we will see that when we
-
01:12:26 read it, it will return the set value plus date time now and when we set the value it
-
01:12:33 will convert it into uppercase.
-
01:12:36 So we will see date time plus empty character, plus uppercase of programming.
-
01:12:44 Let's see if it is the way okay, custom property string, set value is programming and the return
-
01:12:50 value is, you see date time empty character and uppercase of programming.
-
01:12:55 So this is what is about having properties with custom, get and set methods?
-
01:13:03 Okay.
-
01:13:05 Basically, we are overloading the get method, overriding basically the get method, and we
-
01:13:20 are overriding the set method.
-
01:13:24 You may not understand this right now, but over the time you will understand it.
-
01:13:30 The same rule applies for integer, so let's see the integer as well and for the integer
-
01:13:40 we did set as our second integer.
-
01:13:51 Yes, the set value of second integer is one thousand, and let's see the output value.
-
01:14:02 So when we set one thousand, it will be set as one thousand plus five, and when we get
-
01:14:11 it, it will return five because the ten percent.
-
01:14:15 Actually, this is, not the percent of not the percent we take.
-
01:14:22 This is named, as I think.
-
01:14:27 This is named something different, probably okay.
-
01:14:39 This is modulus operator or reminder operator yeah.
-
01:14:46 This is the correct naming, reminder or modulus operator.
-
01:14:53 So we will get five, let's see, and I will also check the values from debug window, so
-
01:15:02 you will understand better.
-
01:15:06 Okay, let's see the screen, I run it and continue.
-
01:15:14 Okay, so you see the custom property in second integer set value is five, however, displayed
-
01:15:21 value is five as we guess it and let's see from debug, when I hover my mouse, my cursor
-
01:15:30 over my class instance, I can see.
-
01:15:32 So you see the private value is one thousand five, however, read value is five, because
-
01:15:39 when we are reading, we are applying the reminding operator ten and when you divide one thousand
-
01:15:48 five to ten, the reminding value is five.
-
01:15:53 It is same for custom property.
-
01:15:55 The value is programming, however, when we read it, it is date time plus programming,
-
01:16:02 okay, so how to with fields?
-
01:16:19 Properties.
-
01:16:23 How to compose a okay.
-
01:16:37 Let's see formal definition of field versus properties in c sharp, okay, let's read it.
-
01:17:01 DIFFERENCES - USES (when and why) A field is a variable that is declared directly in
-
01:17:05 a class or struct.
-
01:17:07 A class or struct may have instance fields or static fields or both.
-
01:17:12 Generally, you should use fields only for variables that have private or protected accessibility.
-
01:17:18 Data that your class exposes to client code should be provided through methods, properties,
-
01:17:23 and indexers.
-
01:17:25 By using these constructs for indirect access to internal fields, you can guard against
-
01:17:29 invalid input values.
-
01:17:31 A property is a member that provides a flexible mechanism to read, write, or compute the value
-
01:17:37 of a private field.
-
01:17:39 Properties can be used as if they are public data members, but they are actually special
-
01:17:43 methods called accessors.
-
01:17:46 This enables data to be accessed easily and still helps promote the safety and flexibility
-
01:17:51 of methods.
-
01:17:53 Properties enable a class to expose a public way of getting and setting values, while hiding
-
01:17:57 implementation or verification code.
-
01:18:00 A get property accessor is used to return the property value, and a set accessor is
-
01:18:05 used to assign a new value.
-
01:18:07 Okay, so you see, it is a very good answer and I will show you the what they mean of
-
01:18:19 value checking okay.
-
01:18:23 So it says that with properties we can have value checking.
-
01:18:29 What does that mean is?
-
01:18:31 Let me show you, let's assume, that you have a volume control of an application: okay volume,
-
01:18:46 let's name it as irVolume.
-
01:18:52 Okay, let's check, or let's say.
-
01:19:12 So a volume can be between zero and 100 right, so what we are going to do is we will do like
-
01:19:24 this.
-
01:19:25 We will assign value to volume and then, if volume is bigger than if volume is greater
-
01:19:43 than 100, I will return 100.
-
01:19:47 If volume is lesser than zero, I will return zero, as I will return volume.
-
01:20:08 So you see now I am having a control at the get method.
-
01:20:13 I could do this in the set method as well.
-
01:20:16 However, uh both works, so let's print some volumes: okay, let's, let's do an example:
-
01:20:37 okay!
-
01:20:39 First, I will set it to volume as something like this and volume.
-
01:20:54 Okay, then I will set it to 55.
-
01:21:03 Then, okay, something like this, and then so you will see the difference of set and
-
01:21:23 get volume will be equal to as something like this okay.
-
01:21:34 So what values do we expect to see?
-
01:21:39 Okay, let's run the application.
-
01:21:53 What values do we expect to see?
-
01:21:54 This is something hard to guess I would say so: first, we will see zero.
-
01:22:03 The value will be set privately minus 321.
-
01:22:08 This one will show 55.
-
01:22:12 The value will be set as 55.
-
01:22:14 This one will show 100.
-
01:22:17 The value will be 1554.
-
01:22:21 This will show zero, however, the value will be minus 1154.
-
01:22:35 Okay, so here the private value will be different, so let's see zero 55, 100, and zero, and let's
-
01:22:45 see the private values of the last example or each example.
-
01:22:52 Let's see: okay, private value, 21 private value, 55, private value, 4, and the private
-
01:23:10 value will be this okay.
-
01:23:14 So, let's see because when it is going to do an addition,
-
01:23:26 it will read its current value and when you read the current value, it will be read as
-
01:23:32 100.
-
01:23:35 Okay, because it cannot access the private value at all.
-
01:23:40 Okay, so the private value is you see minus 321.
-
01:23:45 Okay, the private value is 55.
-
01:23:52 Okay, the private value is 1554, and now the private value is 1154.
-
01:24:04 Why?
-
01:24:05 Because, when it is going to do an addition, it will read the value and when it read the
-
01:24:13 value, it returns 100.
-
01:24:15 Not 1554, okay uh, so this is about fields and properties, classes and instance having
-
01:24:32 objects.
-
01:24:33 Since this was an instance-based class, we define an instance of that class and then
-
01:24:42 we can set its values.
-
01:24:46 For example, I can compose another class instance my great class 2 and it will be initialized
-
01:24:58 like this, and I can set its volume as 24, and then I can write the volume of total volume
-
01:25:11 plus this.
-
01:25:17 So what would be the total volume in this case?
-
01:25:22 So this is another.
-
01:25:23 This is initializing another instance because we are using the new keyword here.
-
01:25:28 The new keyword is important because it creates a new instance.
-
01:25:34 Okay and it is used for initialization of objects, a new, a new instance of objects,
-
01:25:46 all right, and so what would be the output?
-
01:25:50 In this case, the output will be in this case.
-
01:25:54 The first volume will be zero.
-
01:25:56 The second volume will be 24.
-
01:25:58 Therefore, the total volume will be 24 and we will be able to analyze each instance unique
-
01:26:06 value.
-
01:26:07 Okay, so as you do programming, you will understand the concept of instances and static variables.
-
01:26:15 Okay, so you see the total volume is zero.
-
01:26:20 24.
-
01:26:22 Do you know why?
-
01:26:27 Because inside listbox it has converted these into the strings, then printed them.
-
01:26:36 Okay, and the second case will be like this.
-
01:26:41 Okay, output is zero.
-
01:26:48 Zero 24 output will be.
-
01:26:58 So you see the importance of parentheses when working with c sharp in this case in here
-
01:27:05 first, the, the .NET compiler, Nconvert this into a string.
-
01:27:12 Then do string concatenation, okay, but here it will do a mathematical summary sum.
-
01:27:21 Then it will convert it into a string okay.
-
01:27:26 So basically, this is equal to.
-
01:27:31 First way is equal to below way.
-
01:27:36 This one is equal to ToString and string okay uh.
-
01:27:48 So you see this is same as this one.
-
01:27:50 Let's run the application: okay, zero, 24, 24, and zero 24.
-
01:28:08 Okay.
-
01:28:11 Let's stop this here, all right, so for the first day, first lecture.
-
01:28:25 Okay, I think at the home you should, make some other examples of what we have seen so
-
01:28:33 far like method overloading, void return type, custom class return type, tuple return type,
-
01:28:44 private, public, static, instance of members, static methods and such and when working at
-
01:28:57 home do not just copy and paste my code.
-
01:29:01 Try to type it yourself.
-
01:29:03 It will help you tremendously.
-
01:29:06 Believe me and, let's see, okay, I think it's enough now I will upload this to our repository
-
01:29:21 and you can also learn it how to make it.
-
01:29:25 So let me just copy and paste git ignore.
-
01:29:28 I use this for to exclude some folders from pushing and I will make it as source codes.
-
01:29:54 Do we need source codes?
-
01:30:02 No, we don't need source codes.
-
01:30:12 I think.
-
01:30:15 Let me check how we did yeah.
-
01:30:26 I will make it okay, okay, okay, and let's upload it to our GitHub repository, so our
-
01:30:36 GitHub repository has readme.
-
01:30:38 First, I have to pull it.
-
01:30:42 Okay: I have to run it from here: okay and.
-
01:31:02 Okay, it's status; okay.
-
01:31:09 It is not a git repository at the moment, so first, we init it.
-
01:31:16 Okay, git add remote origin.
-
01:31:21 I don't remember the exact code, but it was something like this: git remote add origin.
-
01:31:30 Okay, now I will pull okay now git add all, git commit lecture one, and now I should be
-
01:31:52 able to push it: okay, okay, so when I refresh it source code should be here.
-
01:32:22 Let's see the message: Create a pull request for master on GitHub by visiting.
-
01:32:40 Interesting.
-
01:32:41 Why it didn't work?
-
01:32:49 Okay, it says everything is: let's force it.
-
01:33:43 Yes, origin is looking correct.
-
01:34:28 Okay, it is harder to get it done correctly.
-
01:35:06 So let's just save this into our repository and I will delete the git okay and then okay
-
01:35:38 and okay.
-
01:35:45 Now it should update so what I did was.
-
01:35:55 I have re-initialized the git repository with readme and then I did forced update as you
-
01:36:02 can see and because it was an empty repository already now we should see our code here.
-
01:36:14 Let's refresh, I don't understand why, because we are on the main branch we have to inside
-
01:36:28 the master branch, but this is not what I want.
-
01:36:35 I have to delete the default branch here.
-
01:36:41 Okay, let me change the main branch.
-
01:36:57 Okay, I will.
-
01:37:01 I will delete it myself.
-
01:37:03 It is not a problem.
-
01:37:06 I will pause a bit okay, I have fixed the branch and named it as master.
-
01:37:20 Now I will push again in okay.
-
01:37:42 Now you see the lecture one source code added and we have updated the readme file.
-
01:37:54 This semester we will be using discord as well when you click it, it will join you to
-
01:38:03 our discord channel.
-
01:38:07 Please make your username as your real name.
-
01:38:13 This is my another account and you can right-click and change, nickname and type your real name
-
01:38:21 like this, and then you should join our new course channel.
-
01:38:30 It is not here yet, but hopefully, it will be very soon here.
-
01:38:35 So when you are watching this video very likely, you will see the joining number here, for
-
01:38:44 example, when I click five, it will make me join the this one.
-
01:38:49 You see when i, when you join any of these, you can see the new channels as well.
-
01:38:54 They will be also join based, join-based.
-
01:38:58 So our course-related things will be posted here.
-
01:39:03 You can also ask your questions on the general channel as well.
-
01:39:11 I will keep the previous channels as well, so you can also look for them.
-
01:39:19 If you want to remove yourself from certain channels, you can, you can leave the channel
-
01:39:31 and rejoin, I will be leaving right now.
-
01:39:33 Okay, if you have any questions, feel free to ask me from my email or from discord.
-
01:39:41 Both is fine and hopefully see you next week, all right.
