I have the following code, where ApplicationType is an enum. I have the same repeated code (everything except the parameter types) on many other enums. Whats the best way to consolidate this code?
private static string GetSelected(ApplicationType type_, ApplicationType checkedType_)
{
if (type_ == checkedType_)
{
return " selected ";
}
else
{
return "";
}
}