C# 13 Semi-ְauto properties
-
This new feature solves the trade-off between the ease of auto-implemented properties with the versatility of manual ones.
It saves a new variable every time you pull the trigger
Please forgive my (usual) stupidity, but...Wha? All this does (as far as I can tell) is it saves you from having to declare the backing variable, at the expense of creating a new keyword that might conflict with existing code. So...yay?
-
This new feature solves the trade-off between the ease of auto-implemented properties with the versatility of manual ones.
It saves a new variable every time you pull the trigger
Please forgive my (usual) stupidity, but...Wha? All this does (as far as I can tell) is it saves you from having to declare the backing variable, at the expense of creating a new keyword that might conflict with existing code. So...yay?
This is a QoL feature for NotifyPropertyChanged pattern. This will mostly help code generators, avoiding the extra private field creation, and the (very common) generic method that receives the name of the property and the field value can easily compare both new and old field values before raising the property changed notification. Of course, that can be done currently, but this new field keyword will simplify this a lot
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.(John 3:16) :badger:
-
This is a QoL feature for NotifyPropertyChanged pattern. This will mostly help code generators, avoiding the extra private field creation, and the (very common) generic method that receives the name of the property and the field value can easily compare both new and old field values before raising the property changed notification. Of course, that can be done currently, but this new field keyword will simplify this a lot
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.(John 3:16) :badger:
OK, that makes sense. Thank you.
TTFN - Kent