public TeamType(pTeamType t) { name = t.Name; against = new List<string>(); for (int i = 0; i < t.Count(); i++) { against.Add(t[i]); } }
public override pTeamType pGetTeam() { string name = "unknown name"; pTeamType team; List<string> againstList; try { reader.Read(); name = pGetString(); team = new pTeamType(name); while ("Against" == reader.Name) // allowing backward compatibility { // team.Add(pGetString()); againstList = pGetStringList(commaRegex); for (int i = 0; i < againstList.Count; i++) team.Add(againstList[i]); } reader.ReadEndElement(); } catch (System.Exception e) { throw new ApplicationException("Error reading Team named " + name + ": ", e); } return team; }