This style rule concerns specifying the readonly (C#) or ReadOnly (Visual Basic) modifier for private fields that are initialized (either inline or inside of a constructor) but never reassigned.
Options
Options specify the behavior that you want the rule to enforce. For information about configuring options, see Option format.
dotnet_style_readonly_field
Property
Value
Description
Option name
dotnet_style_readonly_field
Option values
true
Prefer that private fields be marked readonly if they're only ever assigned inline or in a constructor
false
Specify no preference over whether private fields are marked readonly
Vir za to vsebino najdete v storitvi GitHub, kjer lahko tudi ustvarite in pregledate težave in zahtevke za uveljavitev sprememb. Če želite več informacij, glejte naš vodnik za sodelavce.
Povratne informacije o izdelku .NET
.NET je odprtokodni projekt. Izberite povezavo za pošiljanje povratnih informacij: