I am summarizing the Code. Following Code iterates almost 4000 times in a foreach loop.
On my local IIS it is working but on Production Cloud Server the complete application crashes.
try
{
cell.Value = decimal.Parse(dr[dc.ColumnName].ToString());
}
catch
{
cell.Value = dr[dc.ColumnName];
}
My query is :- Will Using Catch block as above cause high CPU usage?
As an addition information :-
Catch is hitting 4000 times