77 lines
1.2 KiB
C#
77 lines
1.2 KiB
C#
#define TEST_ENV
|
|
#define STANDARD_EDITION
|
|
#define ENTERPRISE_EDITION
|
|
|
|
#if (!ENTERPRISE_EDITION)
|
|
#warning This class should be used in Enterprise Edition
|
|
#elif (!STANDARD_EDITION)
|
|
#error 최소 스탠다드 버젼은 되어야합니다.
|
|
#else
|
|
class EnterpriseClass
|
|
{
|
|
|
|
}
|
|
#endif
|
|
|
|
internal class Program
|
|
{
|
|
private static void Main(string[] args)
|
|
{
|
|
bool verbose = false;
|
|
// ...
|
|
|
|
#if (TEST_ENV)
|
|
Console.WriteLine("Test Environment: Verbose option is set.");
|
|
verbose = true;
|
|
#else
|
|
Console.WriteLine("Production");
|
|
#endif
|
|
|
|
if (verbose)
|
|
{
|
|
//....
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
|
|
class ClassA
|
|
{
|
|
#region Public Methods
|
|
public void Run() { }
|
|
public void Create() { }
|
|
#endregion
|
|
|
|
#region Public Properties
|
|
public int Id { get; set; }
|
|
#endregion
|
|
|
|
#region Privates
|
|
private void Execute() { }
|
|
#endregion
|
|
}
|
|
|
|
#pragma warning disable 3021
|
|
|
|
namespace App1
|
|
{
|
|
[System.CLSCompliant(false)]
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
//...
|
|
|
|
#pragma warning disable
|
|
if (false)
|
|
{
|
|
Console.WriteLine("TBD");
|
|
}
|
|
#pragma warning restore
|
|
|
|
//...
|
|
}
|
|
}
|
|
}
|