Property Overrides

  • Thread starter Thread starter Jimmy V
  • Start date Start date
J

Jimmy V

I want to override a property in VB, I know in C# I can do this:

Public new String Text
{
 
Hi Jimmy,

....
Class Base
Public Overridable ReadOnly Property Total() As Double
Get
Return ....
End Get
End Property
End Class

Class Base
Inherits Derived
Public Overrides ReadOnly Property Total() As Double
Get
Return ...
End Get
End Property
End Class
....
There is the full example: http://www.awprofessional.com/articles/article.asp?p=170719&seqNum=4&rl=1

PS. "new" statement is not an overriding. It's hidding.

Regards, Alex
[TechBlog] http://devkids.blogspot.com


JV> I want to override a property in VB, I know in C# I can do this:
JV>
JV> Public new String Text
JV> {
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top