What does the following declaration specify? MethodInfo[] GetMethods()
Correct Answer: c) Both a & b
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
Select the type of multitasking methods that exist?
Which of the following is not a relational operator in C#?
What is multithreaded programming?
Consider the following declaration in C#, Which statement is true about this declaration? int[][] array;
What will happen if the value of nNum is 2 and the following code is compiled and executed? switch(nNum) { case 1: Console.WriteLine('nNum = 1'); break; case 2: Console.WriteLine('nNum = 2'); default: Console.WriteLine('nNum is not 1 nor 2'); break; }
What will be the console output when running the 'Main' method ? static void Main(string[] args) { Car firstVehicle = new Bus(); Car secondVehicle = new Motorcycle(); Console.WriteLine(firstVehicle.GetPassengerCount()); Console.WriteLine(secondVehicle.GetPassengerCount()); } internal class Car { internal virtual int GetPassengerCount() { return 4; } } internal class Bus : Car { internal int GetPassengerCount() { return 8; } } internal class Motorcycle : Car { internal override int GetPassengerCount() { return 1; } }
In CQS (Command Query Separation)... which statements are NOT correct?
What does the following code do? unchecked { int i = Int32.MaxValue; int j = i; int product = i * j; Console.WriteLine(product); }
What is the output of the following code snippet. public class ClassOne { public ClassOne(int id, string name, bool isTest) { this.ID = id; this.Name = name; this.IsTest = isTest; } public int ID { get; private set; } public string Name { get; protected set; } protected bool IsTest { get; internal set; } } public void Run() { ClassOne one = new ClassOne(1, 'John', false); Console.WriteLine(one.Name); }
Which of the following will set the process return code to 1?