当前位置: 代码迷 >> ASP.NET >> 新手简单的送分题,
  详细解决方案

新手简单的送分题,

热度:6824   发布时间:2013-02-25 00:00:00.0
新手简单的送分题,,在线等。
while (nXpathNa.MoveToNext())
  {
  string cmp2 = nXpathNa.LocalName.ToString();//success is 父根节点
  mXmInst.ProperEntieDetect(nXpathNa, cmp2, "Name", "Title");//验证是否存在Name, Title 属性
  if (nXpathNa.MoveToFirstAttribute())
  {
  mXmInst.NameValueDetectB(nXpathNa.Name, nXpathNa.Value);
  while (nXpathNa.MoveToNextAttribute())
  {
  atrName = nXpathNa.Name;
  atrNameValue = nXpathNa.Value;
  mXmInst.NameValueDetectB(atrName, atrNameValue);
  MessageBox.Show(atrName + atrNameValue);
  if (atrName.Equals("Type"))
  {
  bool b = System.Enum.IsDefined(typeof(Size), nXpathNa.Value);
  MessageBox.Show(b + "");
  }
  }
  }
  }

------解决方案--------------------------------------------------------
因为nXpathNa.MoveToNext()返回了false
------解决方案--------------------------------------------------------
断点看看进不进while,如果不进就是nXpathNa.MoveToNext()为false,如果进去依次查看if、while条件是否符合
  相关解决方案