本文介绍了算术运算导致溢出.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
public IDataEditState[] Children { get { if (m_ChildrenCache == null) { m_ChildrenCache = new IDataEditState[m_Children.Count - 1]; m_Children.Values.CopyTo(m_ChildrenCache, 0); } return m_ChildrenCache; } }
在上面的代码中,系统抛出了一个异常,原因是算术运算导致溢出." m_Children.Count即将为0. 请帮我....
In the above code one exception threw by system as "arithmetic operation resulted in an overflow." m_Children.Count is coming 0. please help me out ....
推荐答案如果m_Children.Count为零,那么您正在尝试使用-1条目创建m_ChildrenCache数组,不会发生... if m_Children.Count is zero, then you''re trying to create your m_ChildrenCache array with -1 entries, which isn''t going to happen...
更多推荐
算术运算导致溢出.
发布评论