May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Properties can expose both reference and value types, and they are not limited to built-in .NET types, meaning that you can expose your custom classes and structures through properties. The following code shows an Order class that exposes a property of type Customer; such type is another custom class representing a fictitious customer of your company:

You can use the same technique for exposing custom structures. After all, you do nothing different than when you expose strings and integers. Remember that if you do not initialize properties with values, value types returned by properties will have a default value while reference ...
Read now
Unlock full access