Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, agree about using the regular .NET configuration. That was my suggestion a few comments up. I can see why people might want to do something different (i.e. .env) but I wouldn't use that in a .NET project despite how ugly it is. It is ugly but works well.

>> If you do that enough, you might extract common code or but some other class over it for related settings. At which point you might as well declare a DTO and use IOptions<T>

I think it rarely needs to be that complicated. I overengineered the configuration system for something before and regretted it. People understand GetValue<T>(key) anything else makes them have to think for no reason.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: