Ad
Code
Diff
  • using System;
    
    class Kata
    {
        public static void Main() =>  Console.WriteLine("Hello, C#!");
      
    }
    • using System;
    • class Kata
    • {
    • public static void Main()
    • {
    • Console.WriteLine("Hello, C#!");
    • }
    • public static void Main() => Console.WriteLine("Hello, C#!");
    • }
Code
Diff
  • using System;
    using System.Linq;
    using System.Collections.Generic;
    
    namespace Kumite
    {
      public class Problem
      {
        public static int SumDigitsOf(long integer) =>  (int)(from ch in integer.ToString()  
              where Char.IsDigit(ch)  
              select Char.GetNumericValue(ch)).Sum();
        
      }
    }
    • using System;
    • using System.Linq;
    • using System.Collections.Generic;
    • namespace Kumite
    • {
    • public class Problem
    • {
    • public static int SumDigitsOf(long integer)
    • {
    • return (int)(from ch in integer.ToString()
    • public static int SumDigitsOf(long integer) => (int)(from ch in integer.ToString()
    • where Char.IsDigit(ch)
    • select Char.GetNumericValue(ch)).Sum();
    • }
    • }
    • }
Fundamentals
Numbers
Data Types
Logic
Code
Diff
  • public class Math
    {
      public static int Max(int a, int b) => (a > b) ? a : b;
    
    }  
    • public class Math
    • {
    • public int Max(int a, int b)
    • {
    • return (a > b) ? a : b;
    • }
    • public static int Max(int a, int b) => (a > b) ? a : b;
    • }