Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/codewriter-packages/requirefieldsinit-analyzer

C# 11 "Required Members" for Unity
https://github.com/codewriter-packages/requirefieldsinit-analyzer

c-charp compiler csharp ecs extension game-development roslyn-analyzer unity

Last synced: 3 months ago
JSON representation

C# 11 "Required Members" for Unity

Awesome Lists containing this project

README

        

# RequireFieldsInit Analyzer

## Usage

Mark the struct with the `[RequireFieldsInit]` attribute.
The compiler now requires you to initialize all fields
in the object's initializer

![Usage](https://user-images.githubusercontent.com/26966368/229343387-22f6a248-543b-4944-a2a7-9b9344c0aba1.png)
![Usage](https://user-images.githubusercontent.com/26966368/229343423-b4f523e5-67d3-4c32-a383-9ff421c6c458.png)
![Usage](https://user-images.githubusercontent.com/26966368/229343462-6ab6e16b-ef0e-444a-bac8-7e50240bcf13.png)