two delegates and anonymous methods : delegate anonymous : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » delegate anonymous »

 

two delegates and anonymous methods








    
 

using System;


public delegate void ADelegate(int param);
public delegate int BDelegate(int param1, int param2);

public class Starter {
    public static void Main() {
        ADelegate del = delegate(int param) {
            param = 5;
        };
    }

    public int MethodA() {
        BDelegate del = delegate(int param1, int param2) {
            return 0;
        };
        return 0;
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» delegate anonymous