trim last character if not a number
I'm trying to trim out the last charater from a string if not a number For example : "2+3-4*" From there last astrik needs to be trimmed as it is not a number my result should be as "2+3-4". If user enters "2+3+8" then no needs to trim as the last is number.

Asma KhalidPosted Feb 21, 2017, 2:56 AM
if (!char.isDigit(stVal[stVal.Length-1]))
{
Rafnas T PPosted Feb 20, 2017, 11:09 PM
Amit GuptaPosted Feb 20, 2017, 1:26 PM