public Format (string name, int id) { this.name = name; this.id = id; lock (lockobj) { if (formats == null) formats = this; else { Format f = formats; while (f.next != null) f = f.next; f.next = this; } } }