D
Dan
I use the settings grid to create a setting named "ServerName". Now i
want to retrieve it in code and i can't figure out how. This should be
incredibly obvious but i cant get it.
I have tried creating an AppSettingsReader and using
GetValue("ServerName", typeof(String)). That threw an error about key
not found. Then i tried ConfigurationManager.AppSettings["ServerName"]
but that returns blank. I supplied a value when i created the setting.
I did this in VB and C#. The VB one was easy. My.Settings returned
that value. The config files for both apps are the same.
What is the My.Settings equivalent in c#?
dan
want to retrieve it in code and i can't figure out how. This should be
incredibly obvious but i cant get it.
I have tried creating an AppSettingsReader and using
GetValue("ServerName", typeof(String)). That threw an error about key
not found. Then i tried ConfigurationManager.AppSettings["ServerName"]
but that returns blank. I supplied a value when i created the setting.
I did this in VB and C#. The VB one was easy. My.Settings returned
that value. The config files for both apps are the same.
What is the My.Settings equivalent in c#?
dan