For the "Create and assign property" quick-action, how can I change the default accessibility for generated properties? #71422
-
A lot of the time, I'm using the "Create and assign property" quick-action to generate a property for a service I'm injecting via the constructor. I don't want it to be public, I want it to be private. While I can obviously manually update the accessibility after the code is generated, I'd rather have it default to private. However, I simply can't figure out how to change the default accessibility of the generated property to be private. Is there any way to customise this behaviour? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There is no way to make this private. The expectation is that if you want a property, it will be public (That's the 99% case). If you want private, ask to make a field, which will then be private (again, the 99% case). |
Beta Was this translation helpful? Give feedback.
There is no way to make this private. The expectation is that if you want a property, it will be public (That's the 99% case). If you want private, ask to make a field, which will then be private (again, the 99% case).