private int GetIndexByTag(object tag) { for (int i = 0; i < Writer.Objects.Count; i++) { if (Writer.Objects[i].tag == tag) return i; } return -1; }