property syntax problems

Christopher Wright dhasenan at gmail.com
Fri Feb 6 15:33:40 PST 2009


Robert Jacques wrote:
> Also, the x.y.z = 10 not doing anything when y is a struct from your 
> other post is a well known issue is all languages that have POD struct 
> (As far as I know). The solution is to move x.y to a ref return 
> property. Moving from POD members to functions in order to support more 
> complex logic is the primary motivation of properties.

This has given me some trouble in C#. As a result, anything complicated 
in my company's product (anything that is difficult to initialize with 
all the proper fields) is a class, and anything remaining that is a 
struct has only read-only properties.



More information about the Digitalmars-d mailing list