Meinhoonaa
asked on
need help with C# code
I need help to streamline my code. IF condition statement has too many strings to check. How can I improve it? Code sample below. Thanks!
if (s == "AutoPickServer" || s == "DCInfo" || s == "CloseoutStation" || s == "Conveyor_UI" || s == "DivertService" || s == "EndDayMonitor")
{
using (RegistryKey key2 = rkey.OpenSubKey(s))
//PrintKeys(key2);
processValueNames(key2, s, registryDataTable);
}
if (s == "AutoPickServer" || s == "DCInfo" || s == "CloseoutStation" || s == "Conveyor_UI" || s == "DivertService" || s == "EndDayMonitor")
{
using (RegistryKey key2 = rkey.OpenSubKey(s))
//PrintKeys(key2);
processValueNames(key2, s, registryDataTable);
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER