Why? Partial Class within a Partial class

Discussion in 'ASP .Net' started by Billy, Jan 23, 2006.

  1. Billy

    Billy Guest

    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
     
    Billy, Jan 23, 2006
    #1
    1. Advertising

  2. Billy

    Billy Guest

    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
     
    Billy, Jan 24, 2006
    #2
    1. Advertising

  3. Billy

    Billy Guest

    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 :)
     
    Billy, Feb 1, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    905
    Mark Rae
    Dec 21, 2006
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,975
    Smokey Grindel
    Dec 2, 2006
  3. Thomas Heller
    Replies:
    13
    Views:
    862
    Michele Simionato
    Feb 8, 2007
  4. J. Clifford Dyer

    Re: Partial 1.0 - Partial classes for Python

    J. Clifford Dyer, Feb 8, 2007, in forum: Python
    Replies:
    0
    Views:
    525
    J. Clifford Dyer
    Feb 8, 2007
  5. Andrew Jocelyn
    Replies:
    6
    Views:
    6,544
    Andrew Jocelyn
    Feb 8, 2009
Loading...

Share This Page