The obvious way would be:
string[] priorities = { "LOW", "MEDIUM", "HIGH" };
var orderedIssues = issues.OrderByDescending
(issue => Array.IndexOf(priorities, issue.Priority));
But consider using an enumeration:
public enum Priority
{
Low,
Medium,
High
}
var orderedIssues = issues.OrderByDescending
(issue => (Priority)Enum.Parse(typeof(Priority), issue.Priority, true));
Even better would be using the enumeration type as the type of the property / field itself, in which case it's as simple (and less prone to error) as:
var orderedIssues = issues.OrderByDescending(issue => issue.Priority);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…