-
How do you make a class not instantiable
A) Making class as AbstractB) Having a Private constructorC) Making the class sealedD) Both A & B
-
-
Default Access Specifer
What is default access specifer of a class in C#? Is it internal or private?class foo{ int Var; }In the above code snippet. What is the default access specifier for the variable Var.
-
Any process can be divided into multiple
Skill/Topic: AdvancedA) ProgramsB) ThreadsC) Application domains
-
Divide Two Numbers Without Using Division and Modulus Operator
Write C# code to divide two numbers without using the division and modulus operator
-
Which statement is invalid with regards to Constant
A) They must be initialized when they are declaredB) The value of the constant must be computable at compile timeC) Constants are not staticD) Constant is a variable whose value can be changed through out it’s life time when it is static.
-
In a multilevel hierarchy how are the constructors are called
A) TopDownB) BottomUpC) None
-
Public Members
Why do we use properties rather than public members?
-
AutoPostBack Property
There is Cancel button and OK button on page. When we click Cancel button it skips all validation controls and goes to next page.(a)Page AutoPostback of Cancel is True.(b)Page AutoPostback of Cancel is False.(c)Page AutoPostback of OK is True.(d)Page AutoPostback of OK is False.Which option is correct?
-
C# Data Table Multiple Rows
You have multiple rows in C# data table and you have to save it in database using just one call, How will you do it?
Which of the following is not a C# reserved keyword
A) IsB) AsC) InD) Of
Object Oriented and Object Based Language
Explain What are Object Oriented Language and Object Based Language
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).
The following code fails. Why?
int a = 5; int b = 5; object oa = a; object ob = b; Debug.Assert(oa == ob, "oa is not equal ob");
Second maximum number
how to find out second maximum number in C#?
Following are the collections in C#:
Skill/Topic: AdvancedA) structsB) enumC) dictionariesExplanation: Ans. b & c. a isn’t a collection .
Advantage of avl tree over binary search tree.
What is advantage using avl tree instead of using binary search tree ?
How do I create a Delegate/MulticastDelegate?
C# requires only a single parameter for delegates: the method address. Unlike other languages, where the programmer must specify an object reference and the method to invoke, C# can infer both pieces of information by just specifying the method's name. For example, let's use System.Threading.ThreadStart: Foo MyFoo = new Foo();ThreadStart del = new ThreadStart(MyFoo.Baz);This means that delegates can...
Ans