Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Hi,
Can we implement the Abstract class on interface in c#, If
yes then provide the code implementation



Hi, Can we implement the Abstract class on interface in c#, If yes then provide the code imple..

Answer / rakesh

public interface IService<T>
{
int Add(T entity);
void Update(T entity);
}

public abstract class ServiceBase<T> : IService<T>
{
public int Add(T entity) { ... }
public void Update(T entity) { ... }
}

public interface ICarService : IService<Car>
{
}

public class SomeBaseClass : ServiceBase<Car>, ICarService
{
public int Add(Car entity);
public void Update(Car entity);
}

Is This Answer Correct ?    12 Yes 2 No

Post New Answer

More C Sharp Interview Questions

what is the real use of interface in c#,other than that multiple inheritance is not possible

7 Answers  


What is meant by clr?

0 Answers  


What are the classes contained in a single .NET DLL ?

0 Answers   Siebel,


Define property in c#.net?

0 Answers  


Which controls do not have events?

0 Answers  


what is scope of a protected internal member variable of a c# class

0 Answers   Cognizant,


What is the difference between finalize() and dispose() methods?

0 Answers  


List the fundamental oop concepts?

0 Answers  


Can u list some style properties of List Box?

0 Answers   CGI,


What is the difference between abstraction and encapsulation in c#?

0 Answers  


What is a thread c#?

0 Answers  


What does exclamation mark mean in access query?

0 Answers  


Categories