Manage a collection of settings in memory with global scope
Is this a type-safe way to get the setting values?


It's not type-safe in the sense that if you make a mistake in specifying the type parameter of GetSetting, or if someone sets  setting to the wrong type, you're going to get an exception.

I've struggled with this issue before and I have created a solution to this that uses generic keys. It's by no means perfect, but you can use it as an inspiration.