Beispiel #1
0
        public void Display()
        {
            myFunc f = new myFunc(Add);
            f += Sub;
            f += Mul;
            f += Div;

            int a = 3, b = 2;

            f(a, b);

            f -= Sub;
            f -= Div;

            f(a, b);
        }
 void BlinkCounter(myFunc variable)
 {
     if (blinkCounter == 2)
     {
         //doing what u want
         variable();
     }
     else if (blinkCounter <= 3)
     {
         blinkCounter++;
     }
     else
     {
         blinkCounter = 0;
     }
 }
Beispiel #3
0
 /*
  * Function name: Add
  * parametrs: a function
  * return value: an object of ComposedMission
  * the operation of the function: add the function to a list and return the Composed object
  */
 public ComposedMission Add(myFunc a)
 {
     functions.Add(a);
     return(this);
 }
 public static extern bool setfunction(myFunc func);
Beispiel #5
0
 // constructor
 public SingleMission(myFunc func, string name)
 {
     function = func;
     funcName = name;
 }