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 is not reported by legacy SC, but fails the new version of SA1114:
using System;
public class SomeOtherClass
{
private void SomeMethod()
{
this.SomeOtherMethod(
#pragma warning disable 618
this.SomeObsoleteMethod());
#pragma warning restore 618
}
[Obsolete("Don't use me!")]
private int SomeObsoleteMethod()
{
return 0;
}
private void SomeOtherMethod(int someParameter)
{
}
}
Lines that contain #pragma directives should generally be ignored by SC rules.
Warning 618 relates to the use of a member marked obsolete. The #pragma line can be moved to resolve the warning. However, it would be better not to have to move it. (Doing so might unintentionally suppress other errors.)
The text was updated successfully, but these errors were encountered:
The following code is not reported by legacy SC, but fails the new version of SA1114:
Lines that contain
#pragma
directives should generally be ignored by SC rules.Warning 618 relates to the use of a member marked obsolete. The
#pragma
line can be moved to resolve the warning. However, it would be better not to have to move it. (Doing so might unintentionally suppress other errors.)The text was updated successfully, but these errors were encountered: