this post was submitted on 07 Oct 2025
170 points (91.3% liked)
Programmer Humor
26846 readers
1887 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Da fuck?!
Where doe it declare it's a public property? Is it some kind of default now? Everything you write becomes one?
Right there where it says "public". What are you talking about?
Oh, right. I read it all wrong for a moment.
It's an Expression-Bodied Member (available since C#6). The expression (=>) is just syntactic sugar that the compiler recognizes as a single line property with only a getter (under the hood both versions compile the same).
What do you mean? Why does what need to be a public property?