I am reading a app.config entry
<add key="ClassNameSpace.ClassName" value="http://xxxx/xxx.asmx"/>
And I am trying to get the type for the key
var section = configuration.GetSection(sectionKey.ToString());
var appSettings = section as AppSettingsSection;
if (appSettings == null) continue;
foreach (var key in appSettings.Settings.AllKeys)
{
System.Type type = System.Type.GetType(typeof(key).AssemblyQualifiedName);
var webService = new SecureWebService<type>().Service;
}
But I am getting below error
'key' is a variable but is used like a type
Any idea to solve this issue