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
Currently you get a warning if you declare a variable with @:readOnly: Warning : @:readOnly variable declared without never setter modifier also if you make the variable to final.
If you look into the doc of c# you can see that it is possible to set a readonly variable in the constructor: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/readonly
The text was updated successfully, but these errors were encountered:
lublak
changed the title
cs readOnly with final
cs readOnly with final warning
Oct 7, 2021
Currently you get a warning if you declare a variable with @:readOnly:
Warning : @:readOnly variable declared without
neversetter modifier
also if you make the variable to final.If you look into the doc of c# you can see that it is possible to set a readonly variable in the constructor: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/readonly
The text was updated successfully, but these errors were encountered: