I have the method GetOption(5) that returns the value 5K23 and I need to get the last two characters of the string the thing is the value is a string value, so I would need to use Substring I have tried doing:
if( Convert.ToInt32(GetOption(5).Substring(GetOption(5).Length-2, 2) % 2 == 1) )
I can’t seem to get it right, can anyone help me out.
Thanks
You don’t really need last two digits to determine whether number is odd