public class data() {
public string attribute1 { get; set; }
public string attribute2 { get; set; }
public string attribute3 { get; set; }
}
I have a list that orders the given attribute.
_list.OrderBy(x => x.attribute1).ToList();
But I want to define the object first and then execute order in order with the give object. I am wondering if this is possible. for example:
object myAttribute = attribute1;
_list.OrderBy(x => x.myAttribute).ToList();