Groups | Blog | Home
all groups > dotnet faqs > may 2007 >

dotnet faqs : Interface and Abstract Class Can have same method or not



prabhat tiwari
5/1/2007 1:50:56 AM
Suppose a interface having one method "GetName" as
interface I1
{
void GetName();
}

and have a abstract class

abstract calss C1
{

public Abstract void GetName();
}


Class C2:C1,I1
{
public void Override GetName()
{
////Code of class
}



When we create object of C2
in this way

C2 obj= new c2;


Alex Meleta
5/1/2007 10:21:47 AM
It will work. Consider C2 as a class having I1 interface.

Alex
http://devkids.blogspot.com



[quoted text, click to view]

AddThis Social Bookmark Button