-
Can you change the value of a variable while debugging a C# application?
Yes, if you are debugging via Visual Studio.NET, just go to Immediate window.
-
-
Which of the following is an explusive feature of C#?
Skill/Topic: IntermediateA) Object OrientedB) ILC) XML documentation
-
Events in C# are impltemented using:
Skill/Topic: AdvancedA) Specialized DLLsB) PointersC) Delegates
-
Reference types are stored in :
Skill/Topic: AdvancedA) the HeapB) the stackC) the hard-disk
-
Assembly version information is stored in the:
Skill/Topic: AdvancedA) ManifestB) Garbage CollectorC) Heap
-
To access attributes, the following is used:
Skill/Topic: AdvancedA) reflectionB) pointersC) collections
-
Which are the important features of IL
A) Use of attributesB) Strong data typingC) Object orientation & use of interfaceD) All of the above
-
Which of the following is wrong with regards to Out keyword
A) For Out parameters a variable can be passed which has not initializedB) If Out parameters are not assigned a value with in the function body compiler throws errorC) The variable passed as a Out parameter must be static
-
Sealed class can be inherited
A) TrueB) FalseExplanation: Sealed class cannot be inherited
-
-
-
-
-
How do destructors and garbage collection work in C#?
C# has finalizers (similar to destructors except that the runtime doesn't guarantee they'll be called), and they are specified as follows: class C{~C(){// your code}public static void Main() {}}Currently, they override object.Finalize(), which is called during the GC process.
-
When do you absolutely have to declare a class as abstract ?
(as opposed to free-willed educated choice or decision based on UML diagram)? When at least one of the methods in the class is abstract. When the class itself is inherited from an abstract class, but not all base abstract methods have been over-ridden.
-
You can create the following using C#
Skill/Topic: BeginnerA) class librariesB) Stand alone GUI (Windows Forms) applicationsC) ASP.NET Web pagesD) Command Line applications
-
What is Boxing?
Skill/Topic: AdvancedA) conversion of reference types to value typesB) conversion of value types to reference typesC) Encapsulating a base class
-
Following are the collections in C#:
Skill/Topic: AdvancedA) structsB) enumC) dictionariesExplanation: Ans. b & c. a isn’t a collection .
-
X=X+1 is equivalent to
A) X++B) X+=1C) Both A & B
C# Interview Questions
Ans