You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix freshness technical error
Fixes#47713
The last freshness edit incorrectly referred to `=>` as "greater than or equal", rather than as the "lambda operator".
Revert that.
* Update docs/csharp/whats-new/tutorials/primary-constructors.md
Co-authored-by: Genevieve Warren <[email protected]>
---------
Co-authored-by: Genevieve Warren <[email protected]>
In this example, the `Translate` method changes the `dx` and `dy` components, which requires the `Magnitude` and `Direction` properties be computed when accessed. The greater than or equal to (`=>`) operator designates an expression-bodied `get` accessor, whereas the equalto (`=`) operator designates an initializer.
59
+
In this example, the `Translate` method changes the `dx` and `dy` components, which requires the `Magnitude` and `Direction` properties be computed when accessed. The lambda operator (`=>`) designates an expression-bodied `get` accessor, whereas the equal-to operator (`=`) designates an initializer.
60
60
61
61
This version of the code adds a parameterless constructor to the struct. The parameterless constructor must invoke the primary constructor, which ensures all primary constructor parameters are initialized. The primary constructor properties are accessed in a method, and the compiler creates hidden fields to represent each parameter.
0 commit comments