PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework how to: property inside property

Reply

how to: property inside property

 
Thread Tools Rate Thread
Old 05-04-2006, 02:33 PM   #1
Bruno Alexandre
Guest
 
Posts: n/a
Default how to: property inside property


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)


  Reply With Quote
Old 05-04-2006, 02:50 PM   #2
md
Guest
 
Posts: n/a
Default Re: how to: property inside property

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

"Bruno Alexandre" <bruno.pub@filtrarte.com> wrote in message
news:udmPY0KWGHA.4768@TK2MSFTNGP05.phx.gbl...
> 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)
>
>



  Reply With Quote
Old 05-04-2006, 02:53 PM   #3
jan.hancic@gmail.com
Guest
 
Posts: n/a
Default Re: how to: property inside property

Make a class or a structure that will expose those proeprtys.

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off