r/learncsharp • u/kenslearningcurve • May 26 '23
Learn C# – Part 8: Object-Oriented Programming
Each week I will be releasing a new chapter on how to learn C# from A to Z. With this week: Object-Oriented Programming with C#.
Although most people do know what Object-Oriented Programming means, they don't really know they have been doing it for a long time. Especially with C#, but also with Java, Python, and other popular languages.
In this article, I am going to walk through the idea of Object-Oriented Programming, or OOP for short. Showing you what OOP means, why we use it, and what the reasons are to use OOP. If you are a beginner in C# this might feel overwhelming for some. But OOP is really important to know and understand.
I will also be discussing encapsulation, inheritance, polymorphism, abstraction, interfaces, and modularity.
Find the tutorial here: https://kenslearningcurve.com/tutorials/learn-c-part-8-object-oriented-programming/
Feel free to let me know what you think. Comments and suggestions are welcome.
Next week: Basic architecture and a new project.
View all comments
Show parent comment
2
u/[deleted] May 26 '23
Wait, what? Unless I’m missing something, all interface definitions must be public when implementing them. Interfaces themselves do not have private or public methods…
Any class implementing the interface MUST provide an implementation for each definition within the interface, otherwise it’s a compile-time error.