M
MFRASER
I need a way to test if a type is Double and I am doing the following, but I
have heard that the try, catch has a lot of overhead and slows the system
down. Is this true, and is there a better way to accomplish this?
double Val = System.Double.NegativeInfinity;
string strValue = null;
//Test for string
try
{
Val = Convert.ToDouble(Cols[tmpCounter]);
}
catch
{
//must be string
strValue = Cols[tmpCounter];
}
have heard that the try, catch has a lot of overhead and slows the system
down. Is this true, and is there a better way to accomplish this?
double Val = System.Double.NegativeInfinity;
string strValue = null;
//Test for string
try
{
Val = Convert.ToDouble(Cols[tmpCounter]);
}
catch
{
//must be string
strValue = Cols[tmpCounter];
}