Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I don't do much , but if this StackOverflow answer this StackOverflow answer applies then you could just do this:

using Settings = MyProject.Namespace.Properties.Settings;
var loadedCode = Settings.Default.LoadedCode;

Like this other StackOverflow answer this other StackOverflow answer is saying:

We prefer to use Properties.Settings (aka. settings.settings) because it's strongly typed.

Now I know for a fact that this works with an app.config, but it might not work with a web.config file... but I think it's worth trying.


Alternatively, this Haacked article describes how to use the configuration API to define your own ConfigurationSection classes, which would be the ultimate way to address this issue. Might be overkill if the above works though.

I don't do much , but if this StackOverflow answer applies then you could just do this:

using Settings = MyProject.Namespace.Properties.Settings;
var loadedCode = Settings.Default.LoadedCode;

Like this other StackOverflow answer is saying:

We prefer to use Properties.Settings (aka. settings.settings) because it's strongly typed.

Now I know for a fact that this works with an app.config, but it might not work with a web.config file... but I think it's worth trying.


Alternatively, this Haacked article describes how to use the configuration API to define your own ConfigurationSection classes, which would be the ultimate way to address this issue. Might be overkill if the above works though.

I don't do much , but if this StackOverflow answer applies then you could just do this:

using Settings = MyProject.Namespace.Properties.Settings;
var loadedCode = Settings.Default.LoadedCode;

Like this other StackOverflow answer is saying:

We prefer to use Properties.Settings (aka. settings.settings) because it's strongly typed.

Now I know for a fact that this works with an app.config, but it might not work with a web.config file... but I think it's worth trying.


Alternatively, this Haacked article describes how to use the configuration API to define your own ConfigurationSection classes, which would be the ultimate way to address this issue. Might be overkill if the above works though.

edited comment into answer
Source Link
Mathieu Guindon
  • 75.5k
  • 18
  • 194
  • 467

I don't do much , but if this StackOverflow answer applies then you could just do this:

using Settings = MyProject.Namespace.Properties.Settings;
var loadedCode = Settings.Default.LoadedCode;

Like this other StackOverflow answer is saying:

We prefer to use Properties.Settings (aka. settings.settings) because it's strongly typed.

Now I know for a fact that this works with an app.config, but it might not work with a web.config file... but I think it's worth trying.


Alternatively, this Haacked article describes how to use the configuration API to define your own ConfigurationSection classes, which would be the ultimate way to address this issue. Might be overkill if the above works though.

I don't do much , but if this StackOverflow answer applies then you could just do this:

using Settings = MyProject.Namespace.Properties.Settings;
var loadedCode = Settings.Default.LoadedCode;

Like this other StackOverflow answer is saying:

We prefer to use Properties.Settings (aka. settings.settings) because it's strongly typed.

Now I know for a fact that this works with an app.config, but it might not work with a web.config file... but I think it's worth trying.

I don't do much , but if this StackOverflow answer applies then you could just do this:

using Settings = MyProject.Namespace.Properties.Settings;
var loadedCode = Settings.Default.LoadedCode;

Like this other StackOverflow answer is saying:

We prefer to use Properties.Settings (aka. settings.settings) because it's strongly typed.

Now I know for a fact that this works with an app.config, but it might not work with a web.config file... but I think it's worth trying.


Alternatively, this Haacked article describes how to use the configuration API to define your own ConfigurationSection classes, which would be the ultimate way to address this issue. Might be overkill if the above works though.

Source Link
Mathieu Guindon
  • 75.5k
  • 18
  • 194
  • 467

I don't do much , but if this StackOverflow answer applies then you could just do this:

using Settings = MyProject.Namespace.Properties.Settings;
var loadedCode = Settings.Default.LoadedCode;

Like this other StackOverflow answer is saying:

We prefer to use Properties.Settings (aka. settings.settings) because it's strongly typed.

Now I know for a fact that this works with an app.config, but it might not work with a web.config file... but I think it's worth trying.

lang-cs

AltStyle によって変換されたページ (->オリジナル) /