KoalaUnknown@lemmy.world to Programmer Humor@programming.devEnglish · 2 days agoWhat's a readabilitylemmy.worldimagemessage-square71fedilinkarrow-up1180arrow-down118
arrow-up1162arrow-down1imageWhat's a readabilitylemmy.worldKoalaUnknown@lemmy.world to Programmer Humor@programming.devEnglish · 2 days agomessage-square71fedilink
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up1arrow-down5·2 days agoDa fuck?! Where doe it declare it’s a public property? Is it some kind of default now? Everything you write becomes one?
minus-squaremozingo@lemmy.worldlinkfedilinkEnglisharrow-up17·2 days agoRight there where it says “public”. What are you talking about?
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up4·2 days agoOh, right. I read it all wrong for a moment.
minus-squarehdsrob@lemmy.worldlinkfedilinkEnglisharrow-up4·2 days agoIt’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).
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up4·2 days agoWhat do you mean? Why does what need to be a public property?
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?