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

Can I define a type that is an alias of another type (like typedef in c++)?

0 Answers  


What is executereader in c#?

0 Answers  


What is difference between method overriding and method overloading?

0 Answers  


What is fcl in c#?

0 Answers  


how to implement a web service in .net

0 Answers  


Is array value type in c#?

0 Answers  


What is iqueryable in linq?

0 Answers  


in the nunit test framework, which attribute must adorn a test class in order for it to be picked up by the nunit gui?

0 Answers   Siebel Systems,


what is an internal specifier? what happens internally when I use access specifier Internal ?

4 Answers   rsystems,


how can i return string by vilating duplicates(inpyt like asdfsda but output should be 2a2d2sf and 2a,2d,2s,f)

2 Answers   Microsoft,


Explain the difference between “constant” and “read-only” variables used in c#?

0 Answers  


What is Satellite Assemblies ?

0 Answers   MCN Solutions,


Categories