1. 4 main OOPS concept?
Encapsulation, Abstraction, Inheritance, Polymorphism
2. Explain Interface?
-> Interface contains only declaration of members. Classes and structures implement these interface members.
-> It has no implementation.
-> contains signature of method, properties, indexes, events.
-> declares only methods, functions and properties in interfaces.cannot declare a variable in interface.
Eg :-
public interface IOrderDetails
{
//Declare an interface member
void UpdateCustStatus();
void TakeOrder();
}
public void UpdateCustStatus()
{
--------
}
public void TakeOrder()
{
--------
}
3. Properties?
-> Attributes of an object.
eg;- a car has color as property
private string m_color;
public string color
{
get { return m-color; }
set { m_color = value; }
}
car maruti = new car();
maruti.color = "white";
console.write(maruti.color);
4. Define Encapsulation
Packing one or more components together thus preventing access to non-essential details thereby resulting in abstraction which displays only relevant information.
5. Access specifiers
Protected, internal, protected internal, public, private
6. How to prevent your class from being inherited by another class?
use sealed class
7. What is the .NET collection class that allows an element to be accessed using a unique key?
Hash table
8. Define abstract class?
1. A class that cannot be instantiated.
2. An abstract class is a class that must be inherited and have the methods overridden.
3. An abstract class is essentially a blueprint for a class without any implementation
1. A class that cannot be instantiated.
2. An abstract class is a class that must be inherited and have the methods overridden.
3. An abstract class is essentially a blueprint for a class without any implementation
9. Name two properties common in every validation control?
ControlToValidate property and Text property
10. What’s a bubbled event?
Events raised by child controls is handled by parent controls. Eg:- Consider datagrid as a parent control in which there are several child controls. There can be a column of link buttons. Instead of writing event routine for each link button, write one routine for parent which will handle the click events of child link buttons.
11. Define smart navigation?
Cursor position is maintained when the page gets refreshed due to server side validation and the page gets refreshed.
12. What is master page?
A single master page defines the look and feel and standard behaviour that you want for all of the pages in a n application.
No comments:
Post a Comment