Why? Partial Class within a Partial class

B

Billy

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
 
B

Billy

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
 
B

Billy

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 :)
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top