Derived classes or functions.

Discussion in 'ASP .Net' started by David E, Aug 28, 2003.

  1. David E

    David E Guest

    Hi,

    I was hoping for a little advice about the following.

    Firstly can I use multiple inheritance in vb.net. For example can I have my
    webform class derive from mulpitle classes, and if so what is the syntax, I
    can derive from a single class (inherit) but not from more than one.

    secondly

    I have certain functions that need to be in every page of this site
    I am developing. so is the best approach to simply put them all into a class
    and derive from it,
    (perhaps not the strongest design) or to #include a file with all the
    functions in in every page.

    The main reason I ask is that I am starting to learn asp.net after
    spending many years in classic asp. I was under the impressoion that
    #including in asp.net was felt to be "not so good" and deriving from a class
    that has no direct relation to the new class (in this case the page) was not
    good design.

    or is there another way that I should be approachng this ie web controls,
    user controls ect...

    any help is appreciated.

    thanks in advance.

    cheers

    david
     
    David E, Aug 28, 2003
    #1
    1. Advertisements

  2. David E

    Natty Gur Guest

    David Hi,

    1) CLR dont support multiple inheritance, thus every development
    language.

    2) The best practice for your situation is static / shared function that
    can be call from every page without creating objects.

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Aug 28, 2003
    #2
    1. Advertisements

  3. David E

    David E Guest

    Thanks for the reply.

    Is the lack of multiple inheritance in the clr not a short coming.

    does this mean that this is not supported in C++ managed extensions, because
    multiple inheritance is supported in C++/Visual C++.
    Is it not a backward step to take it awy from that particular language (or
    it's "extended version.")

    cheers

    martin.

    "Natty Gur" <> wrote in message
    news:...
    > David Hi,
    >
    > 1) CLR dont support multiple inheritance, thus every development
    > language.
    >
    > 2) The best practice for your situation is static / shared function that
    > can be call from every page without creating objects.
    >
    > Natty Gur, CTO
    > Dao2Com Ltd.
    > 34th Elkalay st. Raanana
    > Israel , 43000
    > Phone Numbers:
    > Office: +972-(0)9-7740261
    > Fax: +972-(0)9-7740261
    > Mobile: +972-(0)58-888377
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    David E, Aug 29, 2003
    #3
  4. David E

    Natty Gur Guest

    Hi,

    Managed code does not support:
    multiple inheritance, operator overloading, copy constructors, operator=
    syntax (e.g. +=, -=, *=, etc.),
    friendship (i.e. you cannot use the friend keyword in managed C++).

    I just can tell you what I think about it. I don't see it as a draw back
    for two reasons 1) IL and CLR aim is to enable different languages and
    development tool to generate code that can be use by other languages and
    development tools on different operating systems. Althogh sometime
    multiple inheritance is missing while working with C#, VB etc. we must
    admit that multiple inheritance add level of complexly into programs. 2)
    Managed and unmanaged can communicate easily on C++ program. you can use
    multiple inheritance in unmanaged classes and call them from managed
    classes.

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Aug 29, 2003
    #4
    1. Advertisements

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. Colin Goudie
    Replies:
    6
    Views:
    582
    Victor Bazarov
    Jan 26, 2004
  2. Manuel
    Replies:
    8
    Views:
    739
    Manuel
    Jan 5, 2006
  3. Replies:
    6
    Views:
    448
  4. Replies:
    1
    Views:
    500
    myork
    May 23, 2007
  5. Replies:
    1
    Views:
    472
    Victor Bazarov
    May 23, 2007
Loading...

Share This Page