Witam,
mam zdefiniowaną taka strukturę danych:
public class Samochod
{
public string Opis1 { get; set; }
public string Opis2 { get; set; }
public string Wnetrze{ get; set; }
public string Karoseria{ get; set; }
}
public class Karoseria
{
public string Kolor { get; set; }
public string Grubosc { get; set; }
}
public class Wnetrze
{
public string COpis1 { get; set; }
public string COpis2 { get; set; }
public string Siedzenia { get; set; }
}
public class Siedzenia
{
public int Ilosc { get; set; }
public string Material{ get; set; }
}
Czy mogę / jak mógłbym w pętli odczytać wartości wszystkich właściwości w takim drzewie obiektów?