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
That produces IL representations that are slightly different (IL of first example vs IL of second example) but essentially the same, and basically differ only by the name of the unspeakable field generated (<make>P in the first example, <Make>k__BackingField in the second example).
The text was updated successfully, but these errors were encountered:
pavel-mikula-sonarsource
changed the title
Improve S2292: support primary constructor parameters
Fix S2292 FN: Support primary constructor parameters
Jun 13, 2024
Extend https://sonarsource.github.io/rspec/#/rspec/S2292 to support also parameters in C# 12 primary constructors.
For example, the following property:
can be transformed into an auto-implemented property which is assigned the primary constructor parameter at constructor time:
That produces IL representations that are slightly different (IL of first example vs IL of second example) but essentially the same, and basically differ only by the name of the unspeakable field generated (
<make>P
in the first example,<Make>k__BackingField
in the second example).The text was updated successfully, but these errors were encountered: