-
Delegates and Generics in c#
What is the advantage of using delegates and Generics in c# .
-
'this' in C#
Explain about 'this' and where and when it should be used?
-
C# Calender Days
How to find out how many calender days are there between two dates in c#.net?
-
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?
-
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).
-
ByteArray Class
Write a class called ByteArray that implement allocating, reading and writing to an array of bytes. The runtime environment has a limitation. The maximum continuous memory size that it can allocated is 64k bytes. It can allocate many 64K ( or less) chunks. The ByteArray class should hide this limitation and support allocating arrays larger than 64K as in the following example :ByteArray ba = new ByteArray...
-
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.
-
Which of the following is not a C# reserved keyword
A) IsB) AsC) InD) Of
-
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.
-
Describe the accessibility modifier protected internal.
It is available to derived classes and classes within the same Assembly (and naturally from the base class it is declared in).
-
Any process can be divided into multiple
Skill/Topic: AdvancedA) ProgramsB) ThreadsC) Application domains
-
Following are the collections in C#:
Skill/Topic: AdvancedA) structsB) enumC) dictionariesExplanation: Ans. b & c. a isn’t a collection .
-
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");
-
Advantages of static class over class ?
When to use static class and when to use normal class ?
-
In a multilevel hierarchy how are the constructors are called
A) TopDownB) BottomUpC) None
-
-
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?
Reference variable of Interface
It is possible to create the reference variable of an Interface which is 100% abstract in nature.Then why it is not possible to create a reference of an Abstract class?
Ans