Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Blowin.Required
Blowin.Required

Blowin.Required

Blowin

|
24 installs
| (0) | Free
This is a sample diagnostic extension for the .NET Compiler Platform ("Roslyn").
Download

Blowin.Required

Implementation of proposal 'Required Properties' https://github.com/dotnet/csharplang/issues/3630

Add required attribute to property and enjoy :)

public class Person
{
    public string Name { get; set; }
    
    [Required]
    public int Age { get; set; }
}

You can use DataAnnotation, or any attribute with name Required

Support diagnostics:

  1. Required property must be initialized (initializer)
  2. Type can't be used as generic parameter with new() restriction
  3. If constructor initialization of required property, it should be initialized in any execution path
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft