Как не удается неявно преобразовать тип System.коллекции.универсальный.интерфейс IEnumerable в<строка> У' к `системе.коллекции.универсальный.интерфейс IEnumerable и Л;int> У'.я тоже...
Я получаю эту ошибку для - "select v. VehicleName;"
Что я уже пробовал:
namespace LinqApp1 //DO NOT CHANGE the namespace name { public class Program //DO NOT CHANGE the class name { /** DO NOT CHANGE this 'List' declaration with initialized values **/ public static List<Vehicle> vehicleList = new List<Vehicle>() { new Vehicle("HO345","CRV","Honda",2015), new Vehicle("HY562","Creta","Hyundai",2017), new Vehicle("RE198","Duster","Reanult",2014), new Vehicle("MA623","Spacio","Suzuki",2014), new Vehicle("TR498","Nexon","Tata",2015), new Vehicle("TR981","Zest","Tata",2016), new Vehicle("HO245","WRV","Honda",2018) }; static void Main(string[] args) //DO NOT Change this 'Main' signature { int fromy,toy; Console.Write("Enter From Year : "); fromy = int.Parse(Console.ReadLine()); Console.Write("Enter To Year : "); toy = int.Parse(Console.ReadLine()); getVehicleName(fromy,toy); } public static void getVehicleName(int fromYear, int toYear) { IEnumerable<int> L = from v in vehicleList where v.ReleaseYear >= fromYear && v.ReleaseYear <= toYear select v.VehicleName; }