Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have declared public Abstract class in Class library project.

Secondly i added new website to the visual studio solution, added reference of Abstract class project to implement the abstract methods & properties.


But its giving me following error :

'_Default' does not implement inherited abstract member 'RnDCSharpPrj_AbstractClass.AbstractClass.Add()'

here :
1) "_Default" is my partial class in Website
2) "RnDCSharpPrj_AbstractClass.AbstractClass.Add()" is the class library project having abstract method Add()


So i tried to implement Add() method in web site...then its giving me new error -

'ASP.default_aspx.GetTypeHashCode()': no suitable method found to override
Posted

This is an example

C#
public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //calling your derived class
        MyClass objMyClass = new MyClass();
        objMyClass.DoSomthing();
    }
}
//Abstract Class
public abstract class MyAbstractClass
{
    public abstract void DoSomthing();
}
//derived class
public class MyClass:MyAbstractClass
{
    public MyClass()
    { }
    public override void DoSomthing()
    {
        //add your implimentation here
    }
}


[edit] added a small comment[/edit]
 
Share this answer
 
v2
I guess you simply removed your base Page class from the code behind and inherited abstract class.
 
Share this answer
 
Comments
raju melveetilpurayil 28-Jul-10 9:12am    
yes me to think so. hardy1988 delete base Page Class.
:-D :) ;P :( :doh: :sigh: :( :suss::~ :omg: :mad::confused: X| :cool::thumbsup:
 
Share this answer
 
Comments
raju melveetilpurayil 6-Sep-10 5:00am    
Reason for my vote of 1
this is not a place to fun.
:thumbsup::cool: X| :confused: :omg: :-O :(( :sigh: ;P :laugh: :) :-D ;) :( :doh: :-\ :rolleyes: :mad::~:suss::rose::thumbsdown:
 
Share this answer
 
Comments
raju melveetilpurayil 6-Sep-10 5:00am    
Reason for my vote of 1
this is not a place to fun

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900