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

List down the fundamental oop concepts?

0 Answers  


How does c# achieve polymorphism?

0 Answers  


What's the difference between abstraction and encapsulation?

0 Answers  


update data in an xml file which resides in solution itself, using silverlight 4.0

0 Answers  


What is a decimal c#?

0 Answers  


Why do we need collections in c#?

0 Answers  


Define thread?

0 Answers  


How cache is implemented in web application for DB queries?

2 Answers   TCS,


What is the difference between static class and sealed class in c#?

0 Answers  


What is event and delegates in c#?

0 Answers  


What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?

0 Answers  


Can struct be static in c#?

0 Answers  


Categories