Advertisement
yahorrr

Untitled

Oct 11th, 2022
695
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. private static string? CharToWord(char digit) =>
  2.             digit switch
  3.             {
  4.                 '-' => " minus",
  5.                 '+' => " plus",
  6.                 '.' => " point",
  7.                 'E' => " E",
  8.                 '0' => " zero",
  9.                 '1' => " one",
  10.                 '2' => " two",
  11.                 '3' => " three",
  12.                 '4' => " four",
  13.                 '5' => " five",
  14.                 '6' => " six",
  15.                 '7' => " seven",
  16.                 '8' => " eight",
  17.                 '9' => " nine",
  18.                 _ => null
  19.             };
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement