you are viewing a single comment's thread
view the rest of the comments
[–] -5 points 1 year ago (4 children)

Da fuck?!

Where doe it declare it's a public property? Is it some kind of default now? Everything you write becomes one?

  • source
  • hideshow 4 child comments
  • [–] 4 points 1 year ago

    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).

  • source
  • parent