Correct Answer: var d = new[] { 1, 1.5 , 2, 2.5, null, 4, 4.5 };
Explanation:
Note: This Question is unanswered, help us to find answer for this one
C# Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More C# MCQ Questions
You are creating a class to compare a specially formatted string. You need to implement the IComparable<string> interface. Which code segment should you use?
Byte b1 = 1; Byte b2 = 2; Console.WriteLine(b1 + b2);
How many generations does the garbage collector in .NET employ?
What does the @ symbol do when used in C# code?
The following program is expected to run, and after 500 ms write 'OK' and exit, but fails to do that. How would you fix this? class Test { int foo; static void Main() { var test = new Test(); new Thread(delegate() { Thread.Sleep(500); test.foo = 255; }).Start(); while (test.foo != 255) ; Console.WriteLine('OK'); } }
What will be the output of the following set of code? { int sum = 10; try { int i; for (i = -1; i < 3; ++i) sum = (sum / i); } catch (ArithmeticException e) { Console.WriteLine('0'); } Console.WriteLine(sum); Console.ReadLine(); }
If 's1' and 's2' are references to two strings, then which of the following is the correct way to compare the two references?
Which of the following statements is correct about the difference between Static readonly and const?
Which of the following is the object oriented way to handle run time errors? (Choose all that apply)
How you can display different data at run time and design time?