473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Derived classes or functions.

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
Nov 17 '05 #1
3 1190
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!
Nov 17 '05 #2
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" <na***@dao2com.com> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
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!

Nov 17 '05 #3
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!
Nov 17 '05 #4

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

Similar topics

2
by: Luca | last post by:
Hi, I have a quite complex question to ask you: I have defined a base class where I would like to have a map holding pointers to member functions defined in derived classes. To be more precise...
9
by: Daniel Kay | last post by:
Hello! I have written two template classes which implement the observerpattern in C++. I hope I manage to desribe the problem I have. template<class T> class Observer { /* ... */ }; ...
6
by: konstantin.kivi | last post by:
Hello All We have a system where customer request (of text form) are processed. The number of different request types is more than a thousand. With current ( C-langauage ) design request a...
6
by: ivan.leben | last post by:
I want to write a Mesh class using half-edges. This class uses three other classes: Vertex, HalfEdge and Face. These classes should be linked properly in the process of building up the mesh by...
4
by: Vj | last post by:
Hi all, I am contemplating a design wherein most functions in my base class are virtual and says "request_not_supported". My derived classes override only the functions they support. In net...
4
by: KishorAditya | last post by:
Hi All, Consider the following scenario: class Top { }; class Left: virtual public Top { }; class Right: virtual public Top { }; class Bottom: public Left, public Right {}; Many books propose...
12
by: bgold | last post by:
Hey. I have a base class (SPRITE), and using this base class I have derived a large number of derived classes (PERSON, BULLET, MISSILE, etc.). Now, at a certain point in my program, I have a pair...
9
by: fgh.vbn.rty | last post by:
Say I have a base class B and four derived classes d1, d2, d3, d4. I have three functions fx, fy, fz such that: fx should only be called by d1, d2 fy should only be called by d2, d3 fz should...
6
by: Bhawna | last post by:
I am into c++ code maintenance for last 3-4 years but recently I am put into design phase of a new project. Being a small comapany I dont have enough guidance from seniors. Currently I am into a...
6
by: Christopher | last post by:
I've seen various ways of doing this, but what I want is to be able to take a base class pointer and know which derived class to cast to. For example I am going to make a base light class, that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.