Ad
Code
Diff
  • public class Multiplication
    {
        public int Multip(int a, int b) => a * b;
    
    }
    • public class Multiplication
    • {
    • public int Multip(int a, int b)
    • {
    • return a * b;
    • }
    • public int Multip(int a, int b) => a * b;
    • }
Code
Diff
  • using System;
    using System.Linq;
    
    namespace Solution{
      public class ToAsci
      {
          public static int getAsciSum(string s) => s.ToList().Sum(e => (int)e);
      }
    }
    • using System;
    • using System.Linq;
    • namespace Solution{
    • public class ToAsci
    • {
    • public static int getAsciSum(string s)
    • {
    • int returner = 0;
    • foreach (var el in s)
    • returner += (int)el;
    • return returner;
    • }
    • public static int getAsciSum(string s) => s.ToList().Sum(e => (int)e);
    • }
    • }