Correct Answer: No, because long is not a reference or nullable type
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
Assuming the local system time offset is UTC+5, what does the following program output? using System; public class Program { public static void Main() { DateTime time1 = new DateTime(2000, 1, 1, 10, 45, 0, DateTimeKind.Local); DateTime time2 = new DateTime(2000, 1, 1, 10, 45, 0, DateTimeKind.Utc); TimeSpan span = time2 - time1; Console.WriteLine(span); } }
What will be the output of the following program? class Program { public class Base { public Base() { Console.WriteLine("Parameterless constructor"); } public Base(int x) : this() { Console.WriteLine("Constructor with parameter {0}",x); } static Base() { Console.WriteLine('Static constructor'); } } static void Main(string[] args) { var one = new Base(5); var two = new Base(6); } }
Which one of the following classes are present System.Collections.Generic namespace? 1) Stack 2) Tree 3) SortedDictionary 4) SortedArray
What is the expected output? static void Main() { object o = -10.3f; int i = (int)o; Console.WriteLine(i); }
In C# simple types like int, char and bool are aliases for predefined classes in the System namespace.
Which of the following statements is correct about implementing interfaces explicitly? interface I1 { void example(); }
What will be the output of the following Main program in a C# console application (Assume required namespaces are included): static void Main(string[] args) { Guid g = new Guid('iamnotguid'); Console.WriteLine(g); Console.ReadLine(); }
What will be the output of the following Main program in a C# console application (Assume required namespaces are included): static void Main(string[] args) { string s = null + true; Console.WriteLine(s); Console.ReadLine(); }
Which of the following code snippets returns the type of T, based on the code below? List< T > myList = new List< T >;
Which of the following statements are true about the following C#.Net code? String s1, s2; s1 = 'UpWork'; s2 = 'UpWork';