Classes (Exercise) – Learn C#

4  comments

Yes, believe it or not, we’re already on the 8th part of this tutorial series. We’ve gone through the absolute basics like variables and loops and now we’re going to enter a brave new world: object oriented programming (OOP).

In this tutorial, you will learn why there’s even a need for classes, how to create them, what are fields, what is a constructor and more!

 

This is an exercise for this YouTube video.

Happy learning and good luck!

 

Does every class originally have an implicit parameterless constructor?
With which operator can you access a member (e.g. a field) from an object?
How is the highlighted part of code called?

Pumpkin p = new Pumpkin() { Color = "orange" };

 

About the author 

Matt Rešetár

Matt is an app developer with a knack for teaching others. Working as a Flutter freelancer and most importantly developer educator, he doesn't have a lot of free time 😅 Yet he still manages to squeeze in tough workouts 💪

You may also like

Flutter Bloc & Cubit Tutorial

Flutter Custom & Staggered Page Transition Animation Tutorial

  • Hey man i really appreciate your work! And your a great teacher.. I’ve learned c# from an app but checking your videos have Refreshed my mind and i was going to save a lot of time if i just found them from the begging.. Keep it up ❤

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
    >