MCQs>IT & Programming>C#>What will be the output of the following program: #define DEBUG using System; using System.Diagnostics; class Program { [Conditional('DEBUG')] public static bool Print() { Console.WriteLine('Printed'); return true; } public static void Main(string[] args) { Print(); } }
C# MCQs
What will be the output of the following program: #define DEBUG using System; using System.Diagnostics; class Program { [Conditional("DEBUG")] public static bool Print() { Console.WriteLine("Printed"); return true; } public static void Main(string[] args) { Print(); } }
Answer
Correct Answer: It will give a compilation error because the conditional attribute is not valid
Explanation:
Note: This Question is unanswered, help us to find answer for this one