GtaVUsersInfo/CarPrice.cs

20 lines
455 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.Linq;
namespace GtaVUsersInfo
{
public class CarPrice
{
public string Name { get; set; }
public int Price { get; set; }
public static List<CarPrice> ConvertToCarPriceList(List<Car> cars)
{
return cars.Select(car => new CarPrice
{
Name = car.Name,
Price = car.Price
}).ToList();
}
}
}