Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Derived classes or functions.

Reply
Thread Tools

Derived classes or functions.

 
 
David E
Guest
Posts: n/a
 
      08-28-2003
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


 
Reply With Quote
 
 
 
 
Natty Gur
Guest
Posts: n/a
 
      08-28-2003
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!
 
Reply With Quote
 
 
 
 
David E
Guest
Posts: n/a
 
      08-29-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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!



 
Reply With Quote
 
Natty Gur
Guest
Posts: n/a
 
      08-29-2003
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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Derived::Derived(const Base&) and Derived& operator=(const Base&) developereo@hotmail.com C++ 1 05-23-2007 01:44 PM
Derived::Derived(const Base&) and Derived& operator=(const Base&) developereo@hotmail.com C++ 1 05-23-2007 12:07 AM
how to link classes using pointers of their derived classes ivan.leben@gmail.com C++ 6 09-07-2006 07:00 AM
Vector of abstract classes filled with derived classes ? Manuel C++ 8 01-05-2006 09:07 PM
Base Classes in .exe, derived classes in .dll Colin Goudie C++ 6 01-26-2004 03:18 PM



Advertisments