473,320 Members | 1,829 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,320 software developers and data experts.

accesing property in anscestor

Hello,

suppose I have:

Class A
with property which is overridable 'paramA'

Class B
inherits from class A
Overrides Property paramA() as Integer
Get
Return ???.paramA
End Get
End Property
I know that in C# you can write Return base.paramA
This returns the value of the ancestor.

How is this done in VB?

Thanks
Nov 20 '05 #1
2 895
Hi,

Not sure why you would override paramA if you are returning the
value from the base class. Use MyBase.paramA

Ken
--------------
"newbie" <ne****@nospam.com> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl...
Hello,

suppose I have:

Class A
with property which is overridable 'paramA'

Class B
inherits from class A
Overrides Property paramA() as Integer
Get
Return ???.paramA
End Get
End Property
I know that in C# you can write Return base.paramA
This returns the value of the ancestor.

How is this done in VB?

Thanks

Nov 20 '05 #2
Thanks for the answer.

I've created a control that inherits from the treeview.

In the 'Get' properties I want to return the properties of the base
treeview.

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:Oq*************@TK2MSFTNGP11.phx.gbl...
Hi,

Not sure why you would override paramA if you are returning the
value from the base class. Use MyBase.paramA

Ken
--------------
"newbie" <ne****@nospam.com> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl...
Hello,

suppose I have:

Class A
with property which is overridable 'paramA'

Class B
inherits from class A
Overrides Property paramA() as Integer
Get
Return ???.paramA
End Get
End Property
I know that in C# you can write Return base.paramA
This returns the value of the ancestor.

How is this done in VB?

Thanks


Nov 20 '05 #3

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

Similar topics

3
by: Jeroen Ceuppens | last post by:
Hi, I have a problem accesing h, when i want to do h.Run() after the if else structure, i get the following error: (see below for code) C:\Documents and Settings\Eindwerk\Mijn...
0
by: Gönen EREN | last post by:
I want to populate a datalist in edittemplate the probleme: i get an error while accesing the datagrid public void DataListEdit(Object src, DataListCommandEventArgs e ) { ...
3
by: zek2005 | last post by:
Hi!!! I am accesing a record in a MySQL DB with the a sentence embeded in a php code. The result access a page like: http://www.mysite.com/page.php?id=16 where the id=16 indicates the id of...
13
by: Fernando Deutsch | last post by:
I have an html page with an iframe on it. Inside the iframe there is an img element. I am looking how to reference the iframe from the img element contained on it and cannot find a way to do it. I...
2
by: ras26 | last post by:
I have a WebSite "App1" which has an external assembly "Lib1". Inside this external assembly we have developed some classes that derive from "System.Web.UI.Page". One of these pages is called...
4
by: sracherla | last post by:
Hello Guys, Please look at the code sample below. Class Customer { private string _ID; private string _Name; public string ID
3
by: mfc1981 | last post by:
Hi. I need to access to the hover style of an element with javascript. How can i do this? Best regards Manuel
16
by: Mike | last post by:
Hi, I have a form with some controls, and a different class that needs to modify some control properties at run time. Hoy can I reference the from so I have access to its controls and...
6
by: =?ISO-8859-1?Q?Ignacio_Burgue=F1o?= | last post by:
Hi everyone. I'm dealing with some javascript code which uses eval to access properties of an object. For instance, I have the following: var events = {}; events.flatUsers = {};...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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

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.