C# Programming (Intermediate) - Lecture 1: Method Overriding, Access Modifiers, Non/Static, Tuples
SECourses
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 ... https://www.youtube.com/watch?v=1Gcoql5IIh8
351305858 Bytes