Skip to content

Commit 1b80964

Browse files
Copilotdrewnoakes
andcommitted
Clarify translator comment for init accessor validation message
Co-authored-by: drewnoakes <[email protected]>
1 parent 83bcc44 commit 1b80964

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.VisualStudio.Threading.Analyzers/Strings.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,6 @@ Start the work within this context, or use JoinableTaskFactory.RunAsync to start
369369
</data>
370370
<data name="VSTHRD003InvalidAttributeUse_PropertyWithNonPrivateInit" xml:space="preserve">
371371
<value>Properties with init accessors must be private.</value>
372-
<comment>Error message shown when the CompletedTaskAttribute is applied to a property with a public, internal, or protected init accessor. Init accessors allow setting the property during object initialization, so the property itself must be private when using this attribute to ensure the task value cannot be changed from outside the class.</comment>
372+
<comment>Error message shown when the CompletedTaskAttribute is applied to a property that has an init accessor and the property itself is not private (i.e., it's public, internal, or protected). Init accessors allow setting the property during object initialization. When using this attribute on a property with an init accessor, the entire property must be declared as private to ensure the task value cannot be changed from outside the class.</comment>
373373
</data>
374374
</root>

0 commit comments

Comments
 (0)