I'm trying to purge duplicate value from the list and I'm not sure of a best way to do this.
List<string> sqlOrderBy = new List<string>();
sqlOrderBy.Add("Trim ASC");
sqlOrderBy.Add("Year ASC");
sqlOrderBy.Add("Make DESC");
sqlOrderBy.Add("Year DESC");
sqlOrderBy.Add("Model ASC");
sqlOrderBy.Add("Make ASC");
What I'm trying to figure out is to search for duplicate prefix values like "Year" and "Make" and keep the last one in the list but purge the earlier one regardless of the "ASC" or "DESC" value... What I want it to do is this...
//Trim ASC
//Year DESC
//Model ASC
//Make ASC
Thanks...