public BugInfo queryBugById(string id) { foreach (BugInfo bug in bugs) { if (bug.id.Equals(id)) { return bug; } } return null; }