You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the following code, with the code at the | symbol:
public class Foo
{
public Foo(IBar bar|) // <- cursor at bar here
{
}
}
I have a quick-action available to create a property or private field and assign the argument to it. Is there any way I can configure the naming conventions for those?
The current convention for the field results in
public class Foo
{
private readonly IBar bar;
public Foo(IBar bar)
{
this.bar = bar;
}
}
but I would prefer
public class Foo
{
private readonly IBar _bar;
public Foo(IBar bar)
{
_bar = bar;
}
}
Since I realize this is a matter of preference, I don't expect you to change this for everybody, but it would be nice if it was configurable. (And once there is a configuration system for it, I bet there are other places as well where it would make sense to expose options...)
The text was updated successfully, but these errors were encountered:
Thanks for the request! I agree that we need a way to configure this. The configuration system we intend to use for this is .editorconfig, which is what we're using in Visual Studio as well. We're tracking support for editorconfig with #1726. That issue only mentions formatting options, but the editorconfig support will include naming options as well.
Given the following code, with the code at the
|
symbol:I have a quick-action available to create a property or private field and assign the argument to it. Is there any way I can configure the naming conventions for those?
The current convention for the field results in
but I would prefer
Since I realize this is a matter of preference, I don't expect you to change this for everybody, but it would be nice if it was configurable. (And once there is a configuration system for it, I bet there are other places as well where it would make sense to expose options...)
The text was updated successfully, but these errors were encountered: