Skip to content
Discussion options

You must be logged in to vote

I know we can infer that the consumer is intending to set the underlying field to the incoming value:

Non-auto-properties don't have an underlying field. They are a totally self-contained member and the accessor is expected to perform any assignments. The return type for a set access is void so any result from an expression would just be discarded. You're expected to put a statement in the accessor to actually make the assignment to a field.

There are proposals out there to blur the line between auto-properties and normal properties, however if you are required to explicitly name your fields due to binary serialization concerns then they won't help. Although you should be able to use fi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tacosontitan
Comment options

Answer selected by tacosontitan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants