Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
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;
    }
}


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 ....
Posted
Updated 8-Mar-10 4:57am
v4

1 solution

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...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900