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
Context: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1802
To fix this error and improve performance a bit:
error CA1802: Field 'invalidStateMessage' is declared as 'readonly' but is initialized with a constant value. Mark this field as 'const' instead.
We can't use an interpolated string, or we get the following error on older compilers:
error CS8652: The feature 'constant interpolated strings' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
We can just use the `+` operator and `const`.
0 commit comments