0

我在此代码中收到 StackOverflow 错误:

编辑

[XmlAttribute("ID")]
public string ID { get; set; }

编辑2

 public ParameterEntity this[string szID]
    {
        get
        {
            //Finds the parameter entity with the ID passed in.
            return rParameters.Find(
                  delegate(ParameterEntity oParameterEntity)
                  {
                      return oParameterEntity.ID.Equals(szID, StringComparison.OrdinalIgnoreCase);
                  });
        }
    }

各位大侠能指教一下吗?

我可能只需要使用一个简单的手动循环。

谢谢-奥利弗

4

2 回答 2

1

您的 ID 属性可能正在尝试返回自身或设置自身

就像是

private int _ID;

public int ID{
   get{return ID;}
   set{ID=value;}
}

显然这可能不是那么简单,但沿着这些思路

(许多编辑;P)

于 2009-09-03T11:51:36.393 回答
0

问题出在其他地方。

于 2010-02-23T12:27:47.013 回答