Partial Classes and Inheritance

B

Bishoy George

In a web application using asp.net 2.0

All my classes are partial classes.

- I noticed that partial class cannot be inherited... is that true?

- I tried to remove the partial keyword , and I receieved this error
Error 1 Missing partial modifier on declaration of type
'NagyResearch.Q_A.Q.QuestionnairePage'; another partial declaration of this
type exists D:\Web Sites\Local
Host\NagyResearch\Q_A\Q\QuestionnairePage.aspx.cs 14 18
http://localhost/NagyResearch/

although I haven't any another partial declaration.
 
G

Guest

I could be wrong, but I don't think that the problem is partial classes not
being inheritable. I thuink the problem is that the classes which define the
ASPX pages are not inheritable.

Doug
 
B

Bruce Barker

partial classes support inheritance.

a partial class, is one whose source is split between two source files. the
two files are combined into one binary class. if you take partial off one
source file, then you are defining the same class name twice. if you want to
split into two classes, you need to rename one.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top