-
[C#] SuppressMessageC#/기초 2024. 1. 16. 09:44
코드 단위로 해당 규칙을 Disable.
규칙을 위반하는 .NET 코드에 대해서 SuppressMessage 특성을 설정해서 예외적으로 벗어납니다.[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces", Justification = "This is a marker interface")] public interface IModuleCatalogItem { }
SuppressMessageAttribute Class (System.Diagnostics.CodeAnalysis)
Suppresses reporting of a specific code analysis rule violation, allowing multiple suppressions on a single code artifact. Does not apply to compiler diagnostics.
learn.microsoft.com
https://www.sysnet.pe.kr/2/0/284
VS.NET IDE: 40. FxCop - IDE 에서 제공해 주는 SuppressMessage 코드
VS.NET IDE: 40. FxCop - IDE 에서 제공해 주는 SuppressMessage 코드 [링크 복사], [링크+제목 복사] 조회: 15274 글쓴 사람 정성태 (techsharer at outlook.com) 홈페이지 첨부 파일 부모글 보이기/감추기 .NET 에서의 Cod
www.sysnet.pe.kr
728x90'C# > 기초' 카테고리의 다른 글
[C#] Logger (0) 2024.01.23 [C#] Interface (0) 2024.01.16 [C#] VS 빌드 이벤트, 시스템 매크로 (1) 2024.01.08 [C#] Observable.FromEvent<>() (0) 2023.12.27 [C#] NuGet Package Explorer (1) 2023.12.22 댓글