public abstract class AbstractClass
{
public abstract void AbstractMethod1();
public abstract void AbstractMethod2();
}
public class classA : AbstractClass
{
public override void AbstractMethod1()
{
//some functionality goes here
}
public override void AbstractMethod2()
{
//some functionality goes here
}
}
public class classB : AbstractClass
{
public override void AbstractMethod1()
{
//some functionality goes here
}
public override void AbstractMethod2()
{
//some functionality goes here
}
}
//How can we remove AbstractMethod2 from classB without
//removing AbstractMethod2 method from AbstractClass and without
//removing the classB : AbstractClass relationship
Monday, March 22, 2010
Tuesday, March 9, 2010
What is difference between ExecuteReader, ExecuteNonQuery and ExecuteScalar?
ExecuteReader : Use for accessing data. It provides a forward-only, read-only, connected recordset.
ExecuteNonQuery : Use for data manipulation, such as Insert, Update, Delete.
ExecuteScalar : Use for retriving 1 row 1 col. value., i.e. Single value. eg: for retriving aggregate function. It is faster than other ways of retriving a single value from DB.
ExecuteNonQuery : Use for data manipulation, such as Insert, Update, Delete.
ExecuteScalar : Use for retriving 1 row 1 col. value., i.e. Single value. eg: for retriving aggregate function. It is faster than other ways of retriving a single value from DB.
Thursday, March 4, 2010
What is the Difference between Web.config and Machine.config?
Scope:
Web.config => For particular application in IIS.
Machine.config = > For All the applications in IIS
Created:
Web.config => Created when you create an application
Machine.config => Create when you install Visual Studio
Known as:
Web.config => is known as Application Level configuration file
Machine.config => is known as Machine level configuration file
Location:
Web.config => In your application Directory
Machine.config => …\Microsoft.NET\Framework\(Version)\ CONFIG
Posted by: Neeks |dotnetfunda
Web.config => For particular application in IIS.
Machine.config = > For All the applications in IIS
Created:
Web.config => Created when you create an application
Machine.config => Create when you install Visual Studio
Known as:
Web.config => is known as Application Level configuration file
Machine.config => is known as Machine level configuration file
Location:
Web.config => In your application Directory
Machine.config => …\Microsoft.NET\Framework\(Version)\ CONFIG
Posted by: Neeks |dotnetfunda
Wednesday, March 3, 2010
What is the difference between an EXE and a DLL?
1)You can create an object of Dll but not of the EXE.
2)Dll is an In-Process Component whereas EXE is an OUt-Process Component.
3)Exe is for single use whereas you can use Dll for multiple use.
4)Exe can be started as standalone where dll cannot be.
Posted by: Blessybaby @ http://www.dotnetfunda.com/interview/showcatquestion.aspx?start=24&page=3&category=32
Tuesday, March 2, 2010
How many types are there in GoF patterns?
An advanced interview question start like this.
There are Three types of Gof patterns as of now.
They are
1) Creational patterns
2) Structural patterns
3) Behavioral patterns
There are Three types of Gof patterns as of now.
They are
1) Creational patterns
this type of patterns deals with how they are created.
2) Structural patterns
this type of patterns deals with how they are organized.
3) Behavioral patterns
this type of patterns deals with how they are communicated with each other.
Subscribe to:
Comments (Atom)