-
-
It is not possible for a delegate to wrap more than 1 method
A) True
B) False -
For performing repeated modification on string which class is preferred
A) StringB) StringBuilderC) Both
-
GetEnumerator( ) of Ienumerable interface returns
A) IenumeratorB) IcollectionC) Ienumerable
-
The assembly class is defined in
A) System.ReflectionB) SystemC) System.InteropServices
-
Where does the version dependencies recorded
A) Inside an assembly’s manifestB) Along with the project propertiesC) Both
-
Which of the following has stream as the base class
A) Buffered StreamB) MemoryStreamC) FileStream
-
What is the order of destructors called in a polymorphism hierarchy
A) Starts with derived class ends at base classB) Starts with base class ends at derived classC) The destructor of base can not becalledD) RandomlyExplanation: Uses Bottomup approach while calling Destructors from derived class
-
What does the volatile modifier do
A) The value of the object is written immediately on assignmentB) The value is lost after the system reads it.C) The system stored the value until the end of all current threadsD) The system always reads the current value of a volatile object at the point it is requested
-
-
-
-
-
-
-
-
-
Which keywords can do case insensitive string comparison in c#?
string.Equals("string number 1", "String NUMBER 1", StringComparison.CurrentCultureIgnoreCase) There is also a similar override of String.Compare().
-
Given colors, subtract the fade value and print
What is wrong with the following C# code? It should take the given colors and subtract the given fadeValue and then print out the new faded values. Please copy and paste the code into your response and fix it so that it works correctly.
using System;namespace PCD{ class MainClass { static void Main(string[] args) { int red=110; int green=220; int blue=230; getFadedColor(red,... -
Delegate
The following code illustrates a situation where a boss wants to keep track of the work progress of its subordinates: using System;namespace BigCompany { public class Boss { public void WorkerPercentageDone(int percentage) { Console.WriteLine("I am the boss, and my worker is " + percentage + "% done."); } } public class Worker { Boss boss = null; public Worker(Boss boss) ...
C# Interview Questions
Ans