directx - C# DX What is this param mean? -
i ran while using slimdx
messagepump.run(form, () => { }); what () => { } do?
the expression () => {} empty lambda expression. function messagepump.run defined as:
public static void run( form form, mainloop mainloop ) mainloop defined as:
public delegate void mainloop() so delegate not expects parameters. when pass () => {} method nothing like:
public void mainloopimpl() { //empty method } now create mainloop instance:
var mloop = new mainloop(mainloopimpl); //or alternative syntax mainloop mloop = mainloopimpl; //call run messagepump.run(form, mloop); details declaring, creating , using delegates (including lambda expression declaration way) explained in detail on this msdn page.
Comments
Post a Comment