Out Of Memory Exception

Jun 13 2014 1:38 AM
Hello,
 
      Am a developer developing code for subnets generation.But while compiling the code, it throws "Out  of Memory exception". Could you please Help to resolve it? and also point out the mistake i committed. The following code especially in red color throws that exception. 
 
private List<Subnet_DataGen> CreateSubnet_AfterRemove(IPAddress supernetIP)
        {
            int supernetCIDR;
            int subnetCIDR;          
            supernetCIDR = 8;
            subnetCIDR = Convert.ToInt32(CIDRCBox.SelectedItem.ToString());
            List<Subnet_DataGen> subnets = IPFunction.CreateSubnetsForDataGen(supernetIP, supernetCIDR, subnetCIDR);
            subnets = RemoveExistingSubnets(subnets);
            return subnets;
           
        }
 
Regards,
Vaishnavi