Exemple #1
0
        public void GetData(DSuccess success, DError error)
        {
            Random random = new Random();
            int    num    = random.Next(1, 10);

            Console.WriteLine(num);

            if (num > 5)
            {
                success("Number greater than 5");
            }
            else
            {
                error("Number is less than 5");
            }
        }
Exemple #2
0
 private void Format(DError error)
 {
     Write($"<span class='error'>{error.Error}</span>");
 }