ErythroGuild / irene

<Erythro>'s server admin bot.
Mozilla Public License 2.0
0 stars 0 forks source link

Unify property get/set/init/readonly statuses #284

Open Ernest314 opened 2 years ago

Ernest314 commented 2 years ago

This includes using things like public object Data { get => Object.Data; } instead of public object Data => Object.Data;.

Edit: These two are actually equivalent.

Ernest314 commented 2 years ago

Also initialize properties as such where possible:

public List<string> Data { get; } = new ();

Ernest314 commented 2 years ago

readonly should only modify fields (not properties) and structs (including record structs)--avoid using in other contexts.

See: