C# Constructor Generator for VSCode
Example
From:
namespace MySample
{
class Hoge
{
public int Foo { get; }
private readonly string _bar;
/* cursor here */
}
}
To:
namespace MySample
{
class Hoge
{
public int Foo { get; }
private readonly string _bar;
public Hoge(int foo, string bar)
{
Foo = foo;
_bar = bar;
}
}
}
- Different from csharpextensions:
- Support
sealed class and struct
- Not generate assignments for fields/proeprties with initializer
- Alway generate
public constructor
- Known issues
| |