473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Partial Classes and Inheritance

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.
Mar 22 '06 #1
1 2610
Partial classes can't be compiled either. However, the complete classes that
are created either from one part of a partial class which can be used as a
stand-alone class, or from several partial classes combined, can be
compiled, inherited, you name it.

The key here is that a "partial class" is not a class at all. It is a
convenience for the developer, a way of separating the code which
constitutes a class when built can be spread across several source files. In
addition, it provides the ability to recombine these partial class files
into a variety of different versions of a class. I'm not sure how useful
that is, though.

The actual *class* doesn't exist until it is compiled.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Bishoy George" <bi****@bishoy.com> wrote in message
news:ea**************@tk2msftngp13.phx.gbl...
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.

Mar 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
by: nospam | last post by:
I got three (3) files (1) Untitled.aspx (2) Untitled.aspx.1.cs (3) Untitled.aspx.2.cs These three files must be used together to make file #1, Untitled.aspx, page work via J.I.T. when the...
9
by: Gomaw Beoyr | last post by:
Two question about the "partial classes" (in the next wersion of ..NET). Question 1 ========== Will partial classes (in the next version of C#) have to be declared "partial" in ALL places. ...
7
by: Patrick | last post by:
Hi all, I was playing around with ASP.Net 2.0 and recognized that in case you use Code-Behind/Beside (how is it called in future?) the parser still creates TWO classes one partial class under...
10
by: ptass | last post by:
Hi In asp.net 2.0 an aspx files .cs file is a partial class and all works fine, however, I thought I’d be able to create another class file, call it a partial class and have that compile and...
2
by: Bishoy George | last post by:
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...
26
by: Sanjay | last post by:
Hi All, Not being able to figure out how are partial classes coded in Python. Example: Suppose I have a code generator which generates part of a business class, where as the custome part is to...
1
by: Bruce One | last post by:
I generate some classes and put inside a DLL. I have others classes outside the DLL. I have a problem that the classes outside the DLL are partial classess of the other classes inside the DLL....
2
by: Hiten | last post by:
Is it possible to have more code behind file but that file will have same class in way of partial class, Default Structure I -------------- Homepage.aspx + Homepage.aspx.cs (this .cs file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.