Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class StringToIntToCharValue
- {
- static void Main()
- {
- string number = "0345";
- int a = number.ToString()[0];//по този начин взимаме стойността на чара '0' в ASCII таблицата
- Console.WriteLine(a);//48
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment