W
Wallace
Hai all,
In VC++,
CString str = " 4 76 1";
int nNo = atoi(str.Mid(0,8));
it returns nNo = 4 as output.... it returns the first integer
occurence and neglects the remaining character....
Similarly, In C#.NET I do the same as following....
string str = " 4 76 1";
int nNo = int.Parse(str.Substring(0, 8));
it is throwing the exception as "Input string is not in correct
format....."
How can i get the output as 4(i.e nNo = 4) in c#.net ????
Is there any other function other than parse, to fulfil this??
Please help... Thanx in advance...
Urgent..... Looking forward for the ur response....
In VC++,
CString str = " 4 76 1";
int nNo = atoi(str.Mid(0,8));
it returns nNo = 4 as output.... it returns the first integer
occurence and neglects the remaining character....
Similarly, In C#.NET I do the same as following....
string str = " 4 76 1";
int nNo = int.Parse(str.Substring(0, 8));
it is throwing the exception as "Input string is not in correct
format....."
How can i get the output as 4(i.e nNo = 4) in c#.net ????
Is there any other function other than parse, to fulfil this??
Please help... Thanx in advance...
Urgent..... Looking forward for the ur response....