"c# converting string to int goes wrong" Code Answer

1

50 is the ascii code for char '2'. 0->48, 1->49 etc....

you can do

int number = keycode[1]-'0';
By daharon on August 9 2022

Answers related to “c# converting string to int goes wrong”

Only authorized users can answer the Search term. Please sign in first, or register a free account.