I am just wondering whats the most effecient way to break out of case if statement in C#?
case UserA:
{
if (ConfigurationHelper.GetValue("Environment") == "DEV")
{
//upload document for Dev env
}
else if (ConfigurationHelper.GetValue("Environment") == "UAT")
{
//upload document for UAT env
}
Would it be the following? or is there a better way to do this?
case UserA:
{
if (ConfigurationHelper.GetValue("Environment") == "DEV")
{
//upload document for Dev env
break;
}
else if (ConfigurationHelper.GetValue("Environment") == "UAT")
{
//upload document for UAT env
break;
}