Advertisement
Rakshalpha

ProcessData

Aug 19th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace DelegatesAndEvents
  6. {
  7.     public class ProcessData
  8.     {
  9.         public void Process(int x, int y, BizRulesDelegate del)
  10.         {
  11.             var result = del(x, y);
  12.             Console.WriteLine(result);
  13.         }
  14.  
  15.         public void ProcessAction(int x, int y, Action<int, int> action)
  16.         {
  17.             action(x, y);
  18.             Console.WriteLine("Action has been processed!");
  19.         }
  20.  
  21.         public void ProcessFunc(int x, int y, Func<int, int, int> del)
  22.         {
  23.             var result = del(x, y);
  24.             Console.WriteLine(result);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement