4
Reading a blog article, I came across the following syntax for converting char to integer:
string value = "123";
foreach (var c in value)
{
if (char.IsDigit(c))
{
int digito = c - '0';
}
}
I wonder why this conversion works.