When developing a project with VB6, we created a module and placed the entire project constant in it.
Now, using C #, how can we manage the overall scope of a project?
Put them in a static class.
If you need this class that is referenced in many solutions, create a project in which you put this class. Add links to it.
You can also use the Singleton template. This is a class whose class has only one instance. The class itself is not static, but you only have one instance of this class, and you can provide it through the static property (MyConfig.Configuration in the sample).
public class MyConfig { static MyConfig configuration = new MyConfig(); public static MyConfig Configuration { return configuration; } readonly string version; public string Version { get { return version; } } MyConfig() { version = "0.1"; } }