Rangoli
How to instantiate a delegate?
By Rangoli in ASP.NET on Dec 18 2006
  • C Mouleswar Chakicherla
    Jan, 2007 16

    Declare a Delegate as

    public void myDelegate(int iVal);

    public class myClass

    {

     //Constructor

    main()

    {

    myDelegate objDel = new myDelegate(this.DelImplementation);

    objDel(5);

    }

    public void DelImplementation(int val)

    {

    MessageBox.Show("Method parameter value: "+val.ToString());

    }

    }

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS