using System.Collections.Generic;
public static void Main()
A.Anwendungen.Items = new List<string>();
A.Anwendungen.Items.Add("A");
A.Anwendungen.Items.Add("B");
A.Ersteller.Name = "Hans";
B.Passworte.Items = new List<Dictionary<string, string>>();
B.Passworte.Items.Add("A", "Username");
public string AntragsDaten(){
StringBuilder builder = new StringBuilder();
builder.Append(CatItems(Passworte);
builder.Append(CatItems(Anwendungen);
return builder.ToString();
public string CatItems(Collection Collection){
StringBuilder builder = new StringBuilder();
foreach (var Item in Collection.AsEnumerable()){
builder.Append(Item ?? Item.ToString());
return builder.ToString();
public Ersteller Ersteller;
public Passworte Passworte;
public Anwendungen Anwendungen;
public List<Dictionary<string, string>> Items;
public class Anwendungen{
public List<string> Items;