Check if the last char of a string is odd or even c# : I have a problem to check the last char of a string. I want to get the last char from a string whether odd or even.


String id = "030711026098"


//if the last is odd then gender = male

//if the last is even then gender = female