본문 바로가기
C#(CSharp)/Etc

Simple and Powerful Debug function

by swconsulting 2017. 10. 18.


        public static void TraceMessage(string message,

                     [CallerMemberName] string memberName = "",

                     [CallerFilePath] string sourceFilePath = "",

                     [CallerLineNumber] int sourceLineNumber = 0)

        {

            Debug.WriteLine("message: " + message);

            Debug.WriteLine("member name: " + memberName);

            Debug.WriteLine("source file path: " + sourceFilePath);

            Debug.WriteLine("source line number: " + sourceLineNumber);

        }       



'C#(CSharp) > Etc' 카테고리의 다른 글

Populate data table from data reader  (0) 2018.02.02
TraceListener  (0) 2017.12.07
Send mail by GMail  (0) 2017.08.07
BlockingQueue (BlockingCollection)  (0) 2017.08.07
윈도우 8 메트로 스타일 App Deploy 관련해서...  (0) 2015.04.08