Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because primary constructor was slashed to make a true record type, my new favorite feature is the nameof operator, it is very useful with IPropertyChanged, when you have to use the name of a property to raise a change, it was not type safe if you refactored the name of the property, a workaround used Expression capturing using RaisePropertyChange(p => p.MyProperty) which is very slow (or a CallerMemberName attribute in C# 5 but can be abused), nameof is more elegant.

I also love the ?. operator.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: