4 ms·
In C#, it is also not a good idea to have constructors with failable io in them.
by whatevaa 2y ago
In C#, it is also not a good idea to have constructors with failable io in them.
- neonsunset 2y agoYup, and IO being async usually creates impedance mismatch in constructors. Had to refactor quite a few anti-pattern constructors like this into `async Task<Thing> Create(...)` back in the day. No idea what was the thought process of the original authors, if there was any...