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 are cookies in c#?

964


Explain clr in brief.

961


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

928


Why we use get and set property in c#?

936


How do you type a null character?

880


What is a multicast delegate in c#?

987


Is datetime a value type in c#?

888


Why is it called c sharp?

936


How do you inherit a class into other class in c#?

919


what are the Disadvantages of vb

1045


Why do we use void in c#?

870


What is console writeline in c#?

882


What is gac? What are the steps to create an assembly and add it to the gac?

924


What is a nested type. Give an example?

1034


What is use of singleton class in c#?

989