Код: Выделить всё
public partial class History
{
public string title { get; set; }
public float quantity { get; set; }
public string target { get; set; }
}
public class Data
{
public static List accounts = new List()
{
new Account() {
id = "823378250",
username = "Admin",
email = "admin@gmail.com",
password = "admin123",
balance = 0,
isAdmin = true,
history = new List(),
},
};
}
Код: Выделить всё
var user = Data.accounts.Find(x => x.username = "Admin");
List userHistory = user.history;
foreach (var history in userHistory)
{
// history.title
Подробнее здесь: [url]https://stackoverflow.com/questions/78468636/how-to-access-items-inside-a-list-of-list-c-sharp[/url]
Мобильная версия