About lambda short forms, and other preview items #112932
-
Q: around lambda short forms ... |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
On the question of a int _value;
public int Value { get => field; set => field = value; } Not sure what question that really addresses, unless there was an ability to disguise the desired prefixing strategy. Or that you would not just go ahead and declare the field to begin with. |
Beta Was this translation helpful? Give feedback.
-
String literals WHAT ... Woah, wow. Good to know one the one hand. But assuming there is a memory barrier there, doesn't whacking the string from 16-bit to 8-bit UTF only postpone the inevitable? |
Beta Was this translation helpful? Give feedback.
-
My opinion, based on the JSON spec, representing |
Beta Was this translation helpful? Give feedback.
-
For lambda short form: It allows you to write The majority of design and discussion for C# language is in https://github.com/dotnet/csharplang repo. You can find details of design decisions there. |
Beta Was this translation helpful? Give feedback.
This is a misunderstanding about the feature. You don't need to declare the underlying field. This is a complete property definition: