Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-implemented get/set properties

Is there any downside to letting C# create the private backing fields that are generated by using the automatic property creation (ie {get; set})?

I am aware that it is automatic and therefore you cannot customize the get/set, and would like to know if there are any other implications.

Thanks!

like image 658
markm247 Avatar asked Dec 08 '25 10:12

markm247


1 Answers

The biggest issue that I have come across is that it is often very limiting when looking at binding scenarios. Typically when using data binding you need to implement INotifyPropertyChanged which is not supported by the automatic properties.

like image 83
Chris Taylor Avatar answered Dec 09 '25 23:12

Chris Taylor