var el2 = str.XPathSelectElement("//version/build").Value;
el2 contains 074
the value stored in el2 is number, now i want to decrement that value by 1
after decrement it should be 073
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jun 20, 2013, 5:57 AM
el2 = (Convert.ToInt32(el2) - 1).ToString("D3");
Sunny SharmaPosted Jun 20, 2013, 5:52 AM
el2--;
OR
el2-=1;
Mark it as answer if it helps.
Cheers!