在.NET企业级应用中循环取值

索引(从零开始)必须大于或等于零,且小于参数列表的大小。

 foreach (XmlElement item in element.ChildNodes)
                {
                    sb.Append(string.Format(@"<tr class='odd gradeX'>
                                            <td>{0}</td>
                                            <td>{1}</td>
                                            <td class='hidden-480'>{2}</td>
                                            <td class='hidden-480'>{3}</td>
                                            <td class='center hidden-480'>{4}</td>
                                            <td><a href='/Home/SelAndDel/{5}'>删除</td>
                                        </tr>",
                                        item.Attributes["Id"].Value, item.InnerText,item.Attributes["Age"].Value,
                                        item.Attributes["Sex"].Value, item.Attributes["Phone"].Value)
                                        );
                }

报的错,在foreach 循环时有打断点item有取到这些值

具体报什么错 你要贴出来