While Converting string to Integer Consider the Following things.
For Example u r reading a data from SQL datareader and convert it into integer format
while(SQldr.Read())
{
int a=Int.parse(SQLdr[0].toString());
int b=(int)SQLdr[0];
}
For Example Considering the above coding the later one gave a good performance.
int b=(int)SQLdr[0];
By comparing it into the first one the first one first convert the SQL datareader data
into String.And then only the the string is converted into integer.But the second one is not like that.
So the second one increase the performance
For Example u r reading a data from SQL datareader and convert it into integer format
while(SQldr.Read())
{
int a=Int.parse(SQLdr[0].toString());
int b=(int)SQLdr[0];
}
For Example Considering the above coding the later one gave a good performance.
int b=(int)SQLdr[0];
By comparing it into the first one the first one first convert the SQL datareader data
into String.And then only the the string is converted into integer.But the second one is not like that.
So the second one increase the performance
No comments:
Post a Comment