5 ms·
Can't you already do that with embedded resources?
by floucky 9mo ago
Can't you already do that with embedded resources?
- andix 9mo agoYes, you can. But it's a bit cumbersome. The API to read them is not really intuitive, they are only accessible as a Stream, so they need to be either read every time into a string (new allocation, slow), or you need a helper that reads them once and keeps them in memory. I think there are also a lot of gotchas around naming and listing them. In modern code I don't see them that often anymore.
- orphea 9mo agoI see your point and I don't necessarily disagree but better API for embedded resources is just a couple of simple extension methods away. I wouldn't even bother adding an external package for it.