これを行う簡単な方法があるかどうかを聞きたいだけです。
public void Model(string _model)
{
var list =
from vehicle in vehiclesorted
where vehicle.Model == _model
orderby vehicle.Price
select vehicle;
vehiclesorted = list.ToList();
}
public void Brand(string _brand)
{
var list =
from vehicle in vehiclesorted
where vehicle.Brand == _brand
orderby vehicle.Price
select vehicle;
vehiclesorted = list.ToList();
}
public void Mph(int _mph)
{
var list =
from vehicle in vehiclesorted
where vehicle.Mph <= _mph
orderby vehicle.Price
select vehicle;
vehiclesorted = list.ToList();
}