locked
Getting a property from a different Class RRS feed

  • Question

  • User-1498408751 posted

    Hi there,

    I have a quick question regarding the use of properties. I have 2 classes and I set a property in class A... how can I get this value within Class B? So my classes would look like:

    ClassA:

    Private strx As String
        Public Property x() As String
            Get
                Return strx
            End Get
            Set(ByVal value As String)
                strx = value
            End Set
        End Property


    ClassB:

    Function - I want to get the value of x here. Not sure how I can do this. 

    I have Imports ClassA - but I am stuck here because I only know how to do: Dim Y As New ClassA 


    Any help is appreciated. Thanks

    Wednesday, May 26, 2010 2:26 PM

Answers

All replies