how to: property inside property

  • Thread starter Bruno Alexandre
  • Start date
B

Bruno Alexandre

Hi guys,

I'm wondering how can I manage to do this in my VB Class:

I have a property called Image01_url and other Image01_value

How can I have Image01.url and Image01.value instead?

--------- START CODE -----------------------------

Imports Microsoft.VisualBasic
Public Class ProductBoxes
Private img1u, img1v As String

Public Property image01_url() As String
Get
Return img1u
End Get
Set(ByVal value As String)
img1u = value
End Set
End Property

Public Property image01_value() As String
Get
Return img1v
End Get
Set(ByVal value As String)
img1v = value
End Set
End Property

End Class


--------- END CODE -------------------------------


--


Thank you in Advance.

Bruno Alexandre
(a Portuguese in Denmark)
 
M

md

Separate the Image code into a class called Image, and then have a property
in the ProductBoxes called Image01 of the Image class type you just created.

Hopefully that made some sense.

Matt
 

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

Top