[Gtk-sharp-list] Help needed.

Francisco Moraes fmoraes@nc.rr.com
Wed, 09 Mar 2005 21:06:28 -0500

Fredrik Nilsson wrote:

>How can I translate the (* callback)(foo, baa) to C# code??
You need to use delegates. See the C# section on delegates on Monodoc.

Something like this:

public delegate void SidebarFunc(Widget source, object data);

if(sidebar.SelectionWidget != null)
    callback(sidebar.SelectionWidget, callback_data);