Skip to content

Commit eba2f4d

Browse files
committed
acrolinx
1 parent b8e08ff commit eba2f4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/code-quality/ca2104-do-not-declare-read-only-mutable-reference-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ A mutable type is a type whose instance data can be modified. The <xref:System.T
4343

4444
The read-only modifier ([readonly](/dotnet/csharp/language-reference/keywords/readonly) in C#, [ReadOnly](/dotnet/visual-basic/language-reference/modifiers/readonly) in Visual Basic, and [const](/cpp/cpp/const-cpp) in C++) on a reference type field (or pointer in C++) prevents the field from being replaced by a different instance of the reference type. However, the modifier does not prevent the instance data of the field from being modified through the reference type.
4545

46-
This rule may inadvertently show a violation for a type that is, in fact, immutable. In that case, it is safe to suppress this rule.
46+
This rule may inadvertently show a violation for a type that is, in fact, immutable. In that case, it's safe to suppress the warning.
4747

4848
Read-only array fields are exempt from this rule but instead cause a violation of the [CA2105: Array fields should not be read only](../code-quality/ca2105-array-fields-should-not-be-read-only.md) rule.
4949

@@ -53,7 +53,7 @@ To fix a violation of this rule, remove the read-only modifier or, if a breaking
5353

5454
## When to suppress warnings
5555

56-
It is safe to suppress a warning from this rule if the field type is immutable.
56+
It's safe to suppress a warning from this rule if the field type is immutable.
5757

5858
## Example
5959

0 commit comments

Comments
 (0)