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
The following code illustrates a difference between how SA1513 treats set accessors and init accessors:
class MyClass
{
public int X
{
get
{
return 0;
} // <-- Does NOT trigger SA1513
set
{
}
}
public int Y
{
get
{
return 0;
} // <-- Triggers SA1513
init
{
}
}
}
I expect SA1513 to not trigger before init accessors, just like it does not trigger before set accessors.
Note: SA1516 triggers in both cases, like it should.
Tested with 1.2.0-beta.435
The text was updated successfully, but these errors were encountered:
bjornhellander
added a commit
to bjornhellander/StyleCopAnalyzers
that referenced
this issue
Jun 8, 2023
The following code illustrates a difference between how SA1513 treats set accessors and init accessors:
I expect SA1513 to not trigger before init accessors, just like it does not trigger before set accessors.
Note: SA1516 triggers in both cases, like it should.
Tested with 1.2.0-beta.435
The text was updated successfully, but these errors were encountered: