일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- postgresql
- Shader
- c++11
- C++
- if
- ubuntu
- boost
- SSH
- Eclipse
- Unity
- dataframe
- pi
- sqlite
- 쉘
- null
- mysql
- DROP
- expect
- SVN
- 배열
- pandas
- FIND
- autovacuum
- conda
- sql
- awk
- with
- List
- python
- ngui
Archives
- Today
- Total
その先にあるもの…
ConditionalAttribute 본문
#define CONDITION1
#define CONDITION2
using System; using System.Diagnostics; class Test { static void Main() { Console.WriteLine("Calling Method1"); Method1(3); Console.WriteLine("Calling Method2"); Method2(); Console.WriteLine("Using the Debug class"); Debug.Listeners.Add(new ConsoleTraceListener()); Debug.WriteLine("DEBUG is defined"); } [Conditional("CONDITION1")] public static void Method1(int x) { Console.WriteLine("CONDITION1 is defined"); } [Conditional("CONDITION1"), Conditional("CONDITION2")] public static void Method2() { Console.WriteLine("CONDITION1 or CONDITION2 is defined"); } }
https://msdn.microsoft.com/en-us/library/system.diagnostics.conditionalattribute.aspx
'프로그래밍 > C#' 카테고리의 다른 글
함수 마라미터로 Predicate<> (0) | 2016.03.30 |
---|---|
using문 사용 (0) | 2016.02.02 |
char to int (0) | 2014.12.04 |
Loop 문에서 list요소 삭제하기 (0) | 2014.09.19 |
클래스가 소멸할 때 멤버변수가 클래스인 것은 null이 되는지 궁금 (0) | 2014.09.19 |
Comments