public int GetUnusedWindowId() { int highest = 0; nodes.ForEach((NodeGUI n) => { if(n.WindowId > highest) highest = n.WindowId; }); return highest + 1; }