How can i solve out of Exception error in list generic ?

Posted by Phsika on Stack Overflow See other posts from Stack Overflow or by Phsika
Published on 2010-06-18T13:41:04Z Indexed on 2010/06/18 13:43 UTC
Read the original article Hit count: 335

How can i solve out of memory exception in list generic if adding new value

  foreach(DataColumn dc in dTable.Columns)
                foreach (DataRow dr in dTable.Rows)
                    myScriptCellsCount.MyCellsCharactersCount.Add(dr[dc].ToString().Length);

MyBase Class:

    public class MyExcelSheetsCells
    {
        public List<int> MyCellsCharactersCount { get; set; }

        public MyExcelSheetsCells()
        {
            MyCellsCharactersCount = new List<int>();
        }

    }

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET