Archived

This forum has been archived. Please start a new discussion on GitHub.

Small C# Feature Request

Hi,

Since C# doesn't provide any struct initialization syntax, it would be nice if a default ctor could be generated for structs defined in slice (simply take one argument for each field in the struct and assign). While this may be unweildy for large structs, the majority of these are small, I would guess. This would allow initialization of arrays of structs as they are created, which would facilitate sequences of structs.

Thanks,

-- Andrew Bell
andrew.bell.ia@gmail.com

Comments