-
Every statement in C# must end in
Skill/Topic: BeginnerA) ;B) ,C) #
-
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()
-
All the variables local to a method in C# must be initialized before they can be used
Skill/Topic: BeginnerA) TrueB) False
-
Which of the following is the correct way to instantiate an object in C#:
Skill/Topic: BeginnerA) objThis = System.CreateObject( ThisObject);B) objThis = new ThisObject();
-
A class type in C# is a value type
Skill/Topic: BeginnerA) YesB) NoExplanation: It is a reference type
-
Which of the following are predefined reference types in C#?
Skill/Topic: BeginnerA) intB) objectC) string
-
All types in C# implicitly derive from
Skill/Topic: BeginnerA) System.Object classB) System classC) System.CSharp class
-
What is similar in concept to IL?
Skill/Topic: IntermediateA) Java Byte CodeB) C++ LibrariesC) Machine Language
-
An assembly can be stored across multiple files?
Skill/Topic: IntermediateA) YesB) No
-
Attributes
Skill/Topic: IntermediateA) Are data typesB) Return typesC) Used to provide extra information for the compiler
-
The 'finally' keyword is supported in C#?
Skill/Topic: IntermediateA) YesB) NoExplanation: Along with the try...catch...blocks
-
C# collection allows accessing an element using a unique key?
Skill/Topic: IntermediateA) KeySortB) DictC) HashTable
-
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
-
Garbage Collector:
Skill/Topic: AdvancedA) Copies the IL code to the heapB) Destroys the pointersC) is responsible for automatic memory management
-
Assemblies are of the following types:
Skill/Topic: AdvancedA) SsharedB) PrivateC) Friendly
-
The following namespace is used for globalization:
Skill/Topic: AdvancedA) System.GlobalizationB) System.LocalizationC) System.Locale
-
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)
-
Code running under the control of CLR is often referred as
A) Source CodeB) Managed CodeC) Unmanaged CodeExplanation: Source code is compiled to MSIL, which is generally known as managed code
-
It is not possible to debug the classes written in other .Net languages in a C# project.
A) TrueB) FalseExplanation: It is possible to debug the code as all are adhering to CTS & CLS
-
Which of the following application need not to have an entry point
A) Console applicationB) Windows applicationC) Class ModulesExplanation: Class modules are referred by another project which will have entry point.
C# Interview Questions
Ans