top of page

Day 4: C# starts to get difficult

Updated: Jul 11, 2023

This was by far the slowest day for me. Inheritance and interfaces were some of the hardest topics I encountered besides classes and objects. Learning all the different keywords, what they did and when to use them just did not make sense in the slightest to me. That was, until I discovered stackoverflow: a treasure trove of information waiting at my disposal, with every doubt a programmer could ever have, and all the answers to those doubts. Within almost an hour, I had completely understoof what an interface was, and how inheritance allowed classes to inherit members of other classes. This was the turning point for me, and things only went uphill from here...


______________________________________________________________________________________________________


What is inheritance?

In C#, inheritance allows us to create a new class from an existing class. It is a key feature of Object-Oriented Programming (OOP). The class from which a new class is created is known as the base class (parent or superclass). And, the new class is called derived class (child or subclass).


What is an interface?

An interface defines a contract. Any class or struct that implements that contract must provide an implementation of the members defined in the interface.


What is StackOverflow?

Stack Overflow is a question-and-answer website for programmers. It features questions and answers on certain computer programming topics.


Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page