473,569 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why? Partial Class within a Partial class

In .Net 2, when I have created a strongly typed dataset of a SQL table
and then 'viewed' the code from the RHM menu. I am taken to the new
partial class; as expected, but why do I have a partial class within a
partial? plus if I was to inherit an interface then what partial class
should I place the interface on, the outer partial class or the inner
partial class?

Regards

Billy

Jan 23 '06 #1
2 1259
I have done some more testing and I only get a 'partial class' within a
'partial class' if I attempt to access the code behine (not the
designer code) via the RHM option when viewing the dataset in the
designer view. If I access the code beind using the RHM on the actual
dataset class (*.xsd) then I get the correct code behind which is just
a 'partial class' on its own.

When in the class designer and I have an interface on the screen and a
dataset class on the screen and I create an inheritance between the
interface and the class the interface is applied to the 'designer class
code' and not the 'partial class' code :-( so if I want my 'partial
class' to use an interface then I have to manually type this in.

Billy

Jan 24 '06 #2
My mistake, when rhm clicking on the dataset in the designer and
selecting view code the code it produces is quite rightly a class
within a class but what I didn't notice was that the inner partial
class was acutally the datatable and the outer partial class was the
dataset ... if anything I hope this helps someone :-)

Feb 1 '06 #3

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

Similar topics

21
1622
by: nospam | last post by:
Ok, I asked this question before and I also looked at the book "First Look at ASP.NET 2.0" I also read Paul wilson's web page explanation. HOWEVER...... The book and that web page talks about partial types and that IF you have a Extends keyword, I think, before the class name AND the same Namespace, .NET will automatically compile the rest...
9
2506
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. I.e. do we have to need to write:
0
918
by: Allan Wissing | last post by:
I have a webservice and a Rich Client I have created with VS2005 Beta 2. When I double click on the surface area of the Visual Designer for the dataset, I does not create another partial Class for my Custom Code. To overcome this I created my own partial class, which works fine within the WebService. I do not appear to be able to see my...
16
423
by: Madhuri Mittal | last post by:
Hi, I know that we can define a class over multiple source files using the keyword 'Partial' in C# within a project. Can we define the class over multiple projects using the 'Patial' keyword- I know VB.Net does not allow it, however was wondering if it's possible using C#? Madhuri Mittal
16
2632
by: pawel.pabich | last post by:
Hajo, I would like to have 2 my own partial classes. For example: Default.aspx.cs Default2.aspx.cs and they both will relate to Default.aspx page.
10
2417
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 load as a 3rd partial class. This would be handy so i can generate standard code into one of the partial classes, while having my custom code...
3
1324
by: George Meng | last post by:
Is there a way to build partial class on the fly, the partial class then extend the class which is already complied? For example: I have a class public class TheClass ...... End Class Then at the runtime, I generate the partial class:
9
5771
by: Fat Elvis | last post by:
I'd like to extend some of my Asp.net pages by using Partial Classes. Example ASP.Net Page: public partial class Admin_Customer : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Data_List(); } }
0
7609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7921
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6278
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5504
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.