Properties (Exercise) – Learn C#

0  comments

Properties are an elegant way to handle extra logic for getting or setting a field. As opposed to Java’s getter and setter methods, C# has properties which can help you in C# programming.

This is an exercise for this YouTube video.

Happy learning and good luck!

 

[qsm quiz=13]

 

Assignment: Create a write-only property.

 

 

Click to see the answer
private string backingField;
public string Property
{
    set => backingField = value;
}

 

 

About the author 

Matt Rešetár

Matt is an app developer with a knack for teaching others. Working as a freelancer and most importantly developer educator, he is set on helping other people succeed in their Flutter app development career.

You may also like

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