MCQs>IT & Programming>C#>What will be the output of the following code ? public delegate TextWriter tw(); public static StringWriter stw() { return new StringWriter(); } public static StreamWriter sw() { return null; } public static void Main() { tw t = sw; t += stw; var tt = t(); Console.WriteLine(tt == null ? "Null" : "Not null"); }
C# MCQs
What will be the output of the following code ? public delegate TextWriter tw(); public static StringWriter stw() { return new StringWriter(); } public static StreamWriter sw() { return null; } public static void Main() { tw t = sw; t += stw; var tt = t(); Console.WriteLine(tt == null ? "Null" : "Not null"); }
Answer
Correct Answer: Not null
Explanation:
Note: This Question is unanswered, help us to find answer for this one