Properties (Exercise) – Learn C#

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!


Can a property have only a setter?
Can a property have only a getter?
Can a property have expression-bodied accessors (get/set)?


Assignment: Create a write-only property.



Click to see the answer



Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Development made simple

We're here to help you. If you have any questions, let us know.

Copyright 2017 - 2018 Reso Coder © All Rights Reserved