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...

Can we inherit an interface in an abstract class?

Answer Posted / sowmya

no we can't

using System;
interface abs
{
void display();
}
abstract class abs1:abs
{
public abstract void read();
}
class ba:abs1
{
int a;
public override void read()
{
Console.WriteLine("enter any value");
a=Convert.ToInt32(Console.ReadLine());
}
public void display()
{
Console.WriteLine(" Ur entered value:{0}",a);
}
}
class main
{
public static void Main()
{
ba b=new ba();
b.read();
b.display();
}
}
error CS0535: 'abs1' does not implement interface member
'abs.display()'

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the predicate of a sentence?

967


What is default value of bool in c#?

1001


Can a class be protected in c#?

956


What is a variable in c#?

979


Can abstract class be sealed?

925


Distinguish between the Debug class and Trace class with its functionality?

1045


Suppose two interfaces have same method, so how will you implement these methods in derive class?

1053


What is a private method in c#?

1106


What is tpl in c#?

932


How to sign an assembly with strong name?

1060


What is the difference between namespace and class in c#?

1000


Which is faster dictionary or hashtable?

907


How do I format in c#?

913


Does c# have a 'throws' clause?

1095


How many bytes is an int in c#?

985