Skip to content

A C# Pill that tries to answer the question: Is a property in C# just a collection of two methods?

License

Notifications You must be signed in to change notification settings

CSharp-Pills-15mg/Getters-and-Setters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getters and Setters

Pill Category

Language (C#)

Description

Do you question the reality?

Did you ask yourself what is a property in C#? Maybe not. What reason would you have to do that? A property is a property. Just like a field is a field, a method is a method and so on. They are basic elements that we use to create our programs. Right?

Properties

But, what if a property is not so basic? What if it is just a syntactic sugar for easier writing two special methods: the getter and the setter for a field?

Question

This C# Pill is trying to answer this question:

  • Is a property in C# just a syntactic sugar for a collection of two methods or is it more than that?

Donations

If you like my work and want to support me, you can buy me a coffee:

ko-fi

About

A C# Pill that tries to answer the question: Is a property in C# just a collection of two methods?

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Languages