Skip to content
Discussion options

You must be logged in to vote

One of the central tenets of the field keyword feature is protection of the backing field from access by the class. You use field when the class should have no special access to the backing storage and must only interact through the property directly. However, in your use case, you want the class to have direct access to the backing storage. The vehicle for that scenario is to declare a field so that the class has something to access directly.

Replies: 3 comments 3 replies

Comment options

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

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@DevTKSS
Comment options

@jnm2
Comment options

jnm2 Nov 20, 2025
Collaborator

Answer selected by jnm2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants
Converted from issue

This discussion was converted from issue #9830 on November 19, 2025 23:58.