Ad
Code
Diff
  • public static class Kata
    {
    		public static int SameCase(char a, char b) 
          => !(char.IsLetter(a) && char.IsLetter(b)) ? -1 
          : char.IsUpper(a) == char.IsUpper(b) ? 1 : 0;
    }
    
    • public static class Kata
    • {
    • public static int SameCase(char a, char b) {
    • if (char.IsLetter(a) && char.IsLetter(b))
    • {
    • if (char.IsUpper(a) == char.IsUpper(b))
    • {
    • return 1;
    • }
    • else
    • {
    • return 0;
    • }
    • }
    • return -1;
    • }
    • }
    • public static int SameCase(char a, char b)
    • => !(char.IsLetter(a) && char.IsLetter(b)) ? -1
    • : char.IsUpper(a) == char.IsUpper(b) ? 1 : 0;
    • }