Hi,
I have a value in string type variable ,i want to convert the string type into integer.This is my sample code
int s1;
string s2;
int s3;
if (ds.Tables[0].Rows.Count > 0)
{
s1 = ds.Tables[0].Rows.Count;
for (int i = 0; i < s1; i++)
s2=(ds.Tables[0].Rows[i][0]).ToString();
s3 = Convert.ToInt32 ("s2");
i use also system.int32.pa rse
but in both case the error is coming "Input string was not in a correct format."
please help me to find out the answer of this problem
Thanks,
I have a value in string type variable ,i want to convert the string type into integer.This is my sample code
int s1;
string s2;
int s3;
if (ds.Tables[0].Rows.Count > 0)
{
s1 = ds.Tables[0].Rows.Count;
for (int i = 0; i < s1; i++)
s2=(ds.Tables[0].Rows[i][0]).ToString();
s3 = Convert.ToInt32 ("s2");
i use also system.int32.pa rse
but in both case the error is coming "Input string was not in a correct format."
please help me to find out the answer of this problem
Thanks,
Comment