상세 컨텐츠

본문 제목

System.Obsolete 더이상 사용하지 않는 소스를 표시할때

C#

by 탑~! 2018. 9. 6. 12:25

본문

using System;

public sealed class App {
   static void Main() {      
      // The line below causes the compiler to issue a warning:
      // 'App.SomeDeprecatedMethod()' is obsolete: 'Do not call this method.'
      SomeDeprecatedMethod();
   }

   // The method below is marked with the ObsoleteAttribute. 
   // Any code that attempts to call this method will get a warning.
   [Obsolete("Do not call this method.")]
   private static void SomeDeprecatedMethod() { } 

}



출처: http://flystone.tistory.com/82?category=410122 [MomO]

'C#' 카테고리의 다른 글

자동 시작하는 프로그램  (0) 2018.09.06
SubClass 혹은 BaseClass 체크하기 ( System.Type )  (0) 2018.09.06
LiteDB - .Net, IOS, Android, Windows Phone  (0) 2018.07.04
대용량 텍스트 파일 읽기  (0) 2018.07.04
C# 동적메모리 할당  (0) 2018.07.04

관련글 더보기