CSharp · Console
using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
List<string> Titles= new List<string>(new string[] { "title1", "title2", "title3" });
List<Book> Books = new List<Book>{new Book{Title = Titles[0], Author = string.Empty}, new Book{Title = Titles[1], Author = string.Empty}, new Book{Title = Titles[2], Author = string.Empty}};
// ^ заменить предыдущую строку ^ //
Console.WriteLine(Books[0].Title);
}
}
public class Book
{
public string Title { get; set; }
public string Author { get; set; }
}