-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-IDEBugFeature - IDE0044Make field readonlyMake field readonlyResolution-FixedThe bug has been fixed and/or the requested behavior has been implementedThe bug has been fixed and/or the requested behavior has been implemented
Milestone
Description
IDE0044 suggests the field to be readonly, which can't be used together with volatile.
roslyn/src/Scripting/CoreTestUtilities/ObjectFormatterFixtures/MockDesktopSpinLock.cs
Line 18 in 3dc1532
| private volatile int m_owner; |
It seems reasonable that volatile can be omitted. The field is only set in the constructor. How can multiple threads modify it?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-IDEBugFeature - IDE0044Make field readonlyMake field readonlyResolution-FixedThe bug has been fixed and/or the requested behavior has been implementedThe bug has been fixed and/or the requested behavior has been implemented