Home Comments

Small C# Feature Request

acbellacbell Member Andrew BellOrganization: Iowa State UniversityProject: National Resources Inventory ✭✭
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
[email protected]

Comments

  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    We'll consider adding this.

    Cheers,

    Michi.
Sign In or Register to comment.