More than one public property thingy? just help me out here

Hello,

I just watched the Oop video from the beginner series to refresh my memory on Classes... Anyhow, I know how to get one "intellisence thingy" (ex. Cars.Model) but how can I "expand" further for example, instead of Cars.Model, can I do something like:

Cars.Model.Company.Honda

because I have many (a LOT) of controls and they are separated into 14 tab pages. Each has exact same controls and I was going to try to name them something like:

Day1_Todo1

but I thought that it was better to make a class (named control.vb) and just reference the control such as:

Day1.Todo1

from my main form and just do the Get thing with Public Property from the control.vb class. However, the video only shows how to do "one step" (ex. Cars.Model) but I would like to know how to "expand the one step" such as Cars.Make.Honda.... (not the ....)

Thank You!

Keehun Nam




Answer this question

More than one public property thingy? just help me out here

  • Sugoiram

    You can nest namespaces and classes as deep as you like.



  • Jorge MVP

    what do you exactly mean by that
    do you mean that I can nest many Get() statements within Get() statements
    for example

    Public Property Cars()
    Get
    Get
    Get
    Civic.text
    End Get
    Honda.text
    Cars.text
    End Get
    End Public Property

    for example
    assuming that Civic, Honda, and Cars are all names of textboxes

    Thank You
    Keehun Nam


  • Hancz

    Thanx

    I've researched a bit, and works great!

    But instead, I just put one namespace and ton of nested classes...

    Keehun



  • Jeffrey E. Moeller

    Hi,

    Below link should be of some help in understanding namespaces.
    Link: http://msdn2.microsoft.com/en-us/library/dfb3cx8s(VS.80).aspx

    regards,
    Bhanu.



  • More than one public property thingy? just help me out here