Ok, Im not enough familiar with class for doing what Im looking for.
I have two classes, keeping it simple, say Class1 and Class2.
Now, Class2 contain a property in it that is class1 (Class2 is not a collection of class1) :
Lets keep it simple, here is the Class1 code:
Code:
Now for the Class2 Code :
Code:
What do I need to change in class1 or class2 to make the PropClass1 accessible from a Class2 Object ?
What I would like is to be able to do:
Code:
Actually, with the code above, Class2.PropClass2 is accessible, but not the ".PropClass1" part.
What I need to do for now is:
Code:
That way it works, but I do not want this.
In other words, I would like PropClass2 of Class2 to have sub-properties that are the same as the class1 properties, since PropClass2 is a Class1.
Hope it was understandable...
I have two classes, keeping it simple, say Class1 and Class2.
Now, Class2 contain a property in it that is class1 (Class2 is not a collection of class1) :
Lets keep it simple, here is the Class1 code:
Code:
Code:
Public Class Class1
Private _Prop1 as String
Public Property PropClass1()
Get
Return _Prop1
End Get
Set(ByVal Value)
_Prop1 = Value
End Set
End Class
Now for the Class2 Code :
Code:
Code:
Public Class Class2
Private _Prop2 as Class1 *******
Public Property PropClass2()
Get
Return _Prop2
End Get
Set(ByVal Value)
_Prop2 = Value
End Set
End Class
What do I need to change in class1 or class2 to make the PropClass1 accessible from a Class2 Object ?
What I would like is to be able to do:
Code:
Code:
Dim myClass as Class2
Class2.PropClass2.PropClass1 = "I changed the Property of the PropClass1 of the _Prop2 Object in Class 2, Yeah"
Actually, with the code above, Class2.PropClass2 is accessible, but not the ".PropClass1" part.
What I need to do for now is:
Code:
Code:
Dim myClass1 as Class1
Dim myClass2 as Class2
myClass1.PropClass1 = "blabalblaa"
myClass2.PropClass2 = myClass1
That way it works, but I do not want this.
In other words, I would like PropClass2 of Class2 to have sub-properties that are the same as the class1 properties, since PropClass2 is a Class1.
Hope it was understandable...