Beta 2 compliant This source code below is an an example of how to use /debug option during compilation.Best wishes and good luck ! Source Code/*File name : Debugging .csAuthor : Say Gin Teh*/using System;using System.Diagnostics; // Need to add this when using "conditional"public class Debugging {private int r = 0;public Debugging (int r) {this.r = r;}public int R {get { return r; }set { r = value;}}public static void Main() {methodA();methodB();methodC();methodD();methodE();methodF();}public static void methodA() {Console.WriteLine("Method A");}[Conditional("saygin")] // Basically - do this method only when compiled with /d:sayginpublic static void methodB() {Console.WriteLine("Method B - has [conditional(saygin)]");}public static void methodC() {Console.WriteLine("Method C");}public static void methodD() {Console.WriteLine("Method D");}[Conditional("alex")]public static void methodE() {Console.WriteLine("Method E - has [conditional(alex)]");}[Conditional("saygin"),Conditional("alex")]public static void methodF() {Console.WriteLine("Method F - has [conditional(saygin),conditional(alex)]");}}The output1] Compiling : csc /d:saygin Debugging.cs>Debugging.exeMethod AMethod B - has [conditional(saygin)]Method CMethod DMethod F - has [conditional(saygin),conditional(alex)]
2] Compiling : csc Debugging.cs>Debugging.exeMethod AMethod CMethod D
3] Compiling : csc /d:saygin;alex Debugging.cs>Debugging.exeMethod AMethod B - has [conditional(saygin)]Method CMethod DMethod E - has [conditional(alex)]Method F - has [conditional(saygin),conditional(alex)]
4] Compiling : csc /d:alex Debugging.cs>Debugging.exeMethod AMethod CMethod DMethod E - has [conditional(alex)]Method F - has [conditional(saygin),conditional(alex)]
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: