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

How do you create dlls in .NET

0 Answers   Digital GlobalSoft,


What is ControlBox Propertie

0 Answers   MCN Solutions,


What is xml serializer?

0 Answers  


Why we put script in head of asp.net page Why not in body?

1 Answers  


What is a c# delegate?

0 Answers  


What is GAC?

1 Answers   Cognizant,


What is a clr host?

0 Answers  


Can we override constructor in c#?

0 Answers  


Practcle scenario where I can use abstract class and where I can use Interface

1 Answers   Jeevan Technologies,


Why is it called c sharp?

0 Answers  


What happens if you add duplicate elements to a set?

0 Answers  


What are primitive types in c#?

0 Answers  


Categories