20 lines
455 B
C#
20 lines
455 B
C#
|
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();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|