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
thrownew ExampleException("Test");publicsealedclassExampleException:Exception// or internal{publicExampleException(stringmessage):base(message){}publicExampleException(stringmessage,ExceptioninnerException):base(message, innerException){}}
Expected behavior
One of the visibility modifiers (public or internal) should compile without either compiler warning.
Actual behavior
Both options result in a compiler warning.
The text was updated successfully, but these errors were encountered:
Analyzers
Consider making public types internal
Exceptions should be public
Analyzer source
Version: SDK 9.0.100-preview.1
Describe the bug
Setting the visibility of an
Exception
class topublic
causes a CA1515 warning, whereas setting it tointernal
causes a CA1064 warning.Steps To Reproduce
ConsoleApp1.csproj
Program.cs
Expected behavior
One of the visibility modifiers (
public
orinternal
) should compile without either compiler warning.Actual behavior
Both options result in a compiler warning.
The text was updated successfully, but these errors were encountered: