Advertisement
stoneman

Delegati

Jan 8th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. namespace DelegatiTest
  2. {
  3.  
  4.     class Test_delegata
  5.     {
  6.         public delegate void delegat(double a, double b);
  7.  
  8.         public void Kolicnik(double a, double b)
  9.         {
  10.             double kolicnik = a / b;
  11.         }
  12.  
  13.         public void Razlika(double a, double b)
  14.         {
  15.             double razlika = a - b;
  16.         }
  17.     }
  18.  
  19.     class Program
  20.     {
  21.         static void Main(string[] args)
  22.         {
  23.             Test_delegata mojTest = new Test_delegata();
  24.             Test_delegata.delegat x = new Test_delegata.delegat(mojTest.Kolicnik);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement