3

I was out of curiosity wondering if there was any scenario in which a private getter and a public setter would be desired or make sense.

public string Foo { private get; set; }

Also if there is any such use case for a protected getter.

public string Foo { protected get; set; }

Anyone got any scenarios or use cases for this?

Fred
  • 12,086
  • 7
  • 60
  • 83

0 Answers0