-
YIELD Keyword
What is the purpose of YIELD Keyword in C#?
-
What is the difference between const and static read-only?
The difference is that static read-only can be modified by the containing class, but const can never be modified and must be initialized to a compile time constant. To expand on the static read-only case a bit, the containing class can only modify it:-- in the variable declaration (through a variable initializer).-- in the static constructor (instance constructors if it's not static).
-
What is managed code?
Skill/Topic: IntermediateA) Code managed ouside the ILB) Code which can't be managed by the ILC) Code written in VB.NETD) Code to be compiled by IL
-
Is there a way to force garbage collection?
Yes. Set all references to null and then call System.GC.Collect().If you need to have some objects destructed, and System.GC.Collect() doesn't seem to be doing it for you, you can force finalizers to be run by setting all the references to the object to null and then calling System.GC.RunFinalizers().
-
Where does the version dependencies recorded
A) Inside an assembly’s manifestB) Along with the project propertiesC) Both
-
Windows Service
What is Windows Service? Can we develop Windows Service using C#? If Yes, How? How to install or start Windows Service?
-
JScript Use
What is the use of JScript? How to get value of input tag? How to change inner value of div tag from JavaScript.
-
C# Error - Overload for method
I took a button in form.I have two classes emp and bonus.bonus class is inherited from emp class.If bonus is giving ie in dialog box if we select ‘Yes’ b ie bonus is added to sal and we get ts ie total sal along with eno.If bonus is not given ie in dialog box if we select ‘No’ we need to get only sal along with eno.The following pgm is working fine.class emp { private int...
-
Declare Two or More Methods
How to declare two or more methods in C# program..How to implement that methods in the C# program
-
C# Static Objects
How to create static objects in C#?
-
Unsafe Keyword
Why we use pointer in C#.NET with Unsafe keyword?
-
Data grid
How dotnet works in the background when we fetch data from data base to the grid on the form?
-
Can you prevent your class from being inherited and becoming a base class for some other classes?
Yes, that is what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It is the same concept as final class in Java.
-
-
C# Serializable Keyword
What is the use of serializable keyword in C#?
-
Assembly version information is stored in the:
Skill/Topic: AdvancedA) ManifestB) Garbage CollectorC) Heap
-
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
-
If we need to compare X to a value 3 how do we do it in C#
A) If (X==3)B) If (X=3)C) If (X.equals(3) )
-
-
C# Interview Questions
Ans