Skip to main content

Posts

Showing posts from October, 2012

Importance of flushing memory

As we know in our day to day life how important 'Flush' is :),But that teaches us same thing in our programming life as well Let me share a scenario where i faced the issue,In our day to day life of deadlines,Sometimes we forget to write the code which is actually needed there,You achieved the best with your code but you do not achieve the better sometimes The Scenario : I before few days created export to CSV and export functionality of my one of the list (Grid),It was importing the data very well,But on the close examination of data i found out that its inconsistent data,At some point of time it stopped writing the data and from that point onward there were no data in exported file. Following is the code. HSSFRow row = wsheet.GetRow(i); for (short j = 0; j < row.LastCellNum; j++) { HSSFCell cell = row.GetCell(j); string strValue = string.Format("\"{0}\",", Convert.ToString(cell.RichStringCellValue.String)); StreamWriter.Wr