Correct Answer: False
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
What will be the output of the following code: public delegate void TestDel(); class Program { static void Main(string[] args) { Program prog = new Program(); Foo foo = prog.FooGetter(); if (object.Equals(foo, null)) { Console.WriteLine("Uh-oh, something went wrong"); } else { Console.WriteLine(foo.x.ToString()); } Console.ReadLine(); } public Foo FooGetter() { Foo result = null; Bar bar = new Bar(); bar.TestDel += async () => { result = await Foo.GetFoo(); }; bar.DoStuff(); return result; } } public class Foo { public int x { get; set; } public async static Task<Foo> GetFoo() { //Code omited. This method takes approx 3 seconds //to run. This will ALWAYS return a Foo object with an //x value of 1. } } public class Bar { public event TestDel TestDel; public void DoStuff() { TestDel.Invoke(); } }
Can multiple catch blocks be executed?
What is the value of Status.TiredAndHungry? public enum Status { Unknown = 0, Sick = 1, Tired = 2, Hungry = 4, TiredAndHungry = Tired | Hungry }
Having the following code , what will be the result ? public class Animal { public void Walk() { Console.WriteLine('Animal is walking'); } } public class Dog : Animal { public new void Walk() { Console.WriteLine('Dog is walking'); } } void Main() { Animal cat = new Animal(); Dog dog = new Dog(); Animal adog = new Dog(); cat.Walk(); dog.Walk(); adog.Walk(); }
What is the result of following function? public bool SomeTest(){ return 'i like c#'.ToUpper().Equals('I LIKE C#'); }
Which statement below is correct?
Suppose a HashTable named 'upwork' maintains a collection of project areas and the name of the best freelancer in each area. Which of the following is the correct way to find out whether the project area 'C# programming' is present in the collection or not?
Which of the following is not true about interfaces in C#?
Which of the following are correct in relation to the above C#.Net code? Stack st = new Stack(); st.Push('UpWork'); st.Push(9.2); st.Push(6); st.Push('i'); st.Push(false);
Consider the following C# code, What output will be printed on the console? enum Color: int { Blue, Red, Green, Yellow, Orange } int color = (int)Color.Green; Console.WriteLine('{0} and {1}', color, Color.Yellow);