-
-
To write a line of text to the xonsole window, we make the following call
Skill/Topic: BeginnerA) Console.WriteLine()B) console.writeline()C) System.Output()
-
The correct syntax for defining a delefate is:
Skill/Topic: AdvancedA) delegate {MyMethod( int y) }B) delegate void MyMethod(int y) ;C) delegate: MyMethod (int y)
-
What is a multicast delegate?
Skill/Topic: IntermediateA) a delegate having multiple handlers assigned to itB) a delegate called multiple timesC) a delegate which has multiple implementations
-
A delegate in C# is similar to:
Skill/Topic: AdvancedA) COMB) a function pointerC) a pointer
-
To change the value of a variable while debugging , the following window is used
Skill/Topic: IntermediateA) DebugB) WatchC) Immediate
-
Which language is more suitable for writing extermely high performance mission critical applications?
Skill/Topic: AdvancedA) C#B) C++C) Visual Basic .NETExplanation: This is an area where C# lags.
-
Events in C# are impltemented using:
Skill/Topic: AdvancedA) Specialized DLLsB) PointersC) Delegates
-
What is Boxing?
Skill/Topic: AdvancedA) conversion of reference types to value typesB) conversion of value types to reference typesC) Encapsulating a base class
-
Can we use pointers in C#?
Skill/Topic: AdvancedA) YesB) NoExplanation: Pointers can be used if required, but it will be unsafe code.
-
What is automatic memory management in .NET known as:
Skill/Topic: AdvancedA) Managed CodeB) Smart CachingC) Garbage Collection
-
Reference types are stored in :
Skill/Topic: AdvancedA) the HeapB) the stackC) the hard-disk
-
What is CLS?
Skill/Topic: BeginnerA) Common Language SpecificationB) Common Library SystemC) Csharp Language SpecificationD) Code Location Specification
-
How do I do implement a trace and assert?
Use a conditional attribute on the method, as shown below: class Debug{[conditional("TRACE")]public void Trace(string s){Console.WriteLine(s);}}class MyClass{public static void Main(){Debug.Trace("hello");}}In this example, the call to Debug.Trace() is made only if the preprocessor symbol TRACE is defined at the call site. You can define preprocessor symbols on the command line by using the /D switch....
-
There can me more than 1 Main() functions in a C# program
Skill/Topic: IntermediateA) YesB) NoExplanation: While compiling we can specify which Main() function to start in
-
The 'finally' keyword is supported in C#?
Skill/Topic: IntermediateA) YesB) NoExplanation: Along with the try...catch...blocks
-
Inheritance
What is the importance of inheritance in c# and why i used?
-
In the following cases which is not function overloading
A) Same parameter types but different return valuesB) Varying number of parametersC) Different parameters types but different return valuesD) Different parameters type but same return values
-
Data Structures
Assume you have large set of data, say more than 100,000 elements. Each data element has a unique string associated with it. 1. What data structure has the optimal algorithmic access time to any element when the only thing you know about the element is the unique string associated with it? 2. What is the O() time for access to any element using this data structure? 3. What data structures would you...
-
Garbage Collector Generations Algorithm
Explain the Generations Algorithm used in the context of Garbage Collector
C# Interview Questions
Ans