Question add a property to a property of a class

pooya1072

Well-known member
Joined
Jul 5, 2012
Messages
84
Programming Experience
Beginner
hi
look at this :


TextBox1.Size.Width​
how can i create a property like Width under a property like size
suppose i have a class named Person and a property named Eye . how can add a property named color to Eye property .
 
TextBox.Size property returns a value of type Size, which is a structure that has its own properties like the Width property.
Likewise in your case you need to define two types (class or structure), and in one define a property that returns a value/object of the other type.
 
thanks ... i was very confiused about it ... but now i understand it better.
is there any simple and clear references in this case?
 
is there any simple and clear references in this case?
TextBox class, its Size property and the Size structure is documented in MSDN library. Classes, structures, properties etc in general are basic building blocks in programming and also well documented in MSDN library and other learning resources.
 
Back
Top