using GtaVUsersInfo.Controls; using System.Collections.Generic; using System.Linq; namespace GtaVUsersInfo { public class Car { public string Name { get; set; } public int Price { get; set; } public string Photo { get; set; } public string Manufacturer { get; set; } public string Class { get; set; } public string Model { get; set; } public Color color { get; set; } public Car() { } public Car(Car car) { Name = car.Name; Price = car.Price; Photo = car.Photo; Manufacturer = car.Manufacturer; Class = car.Class; Model = car.Model; color = car.color; } public static List ConvertToCarList(List cars) { return cars.Select(car => new Car(car.Car)).ToList(); } } }