forms - Powershell: BeginInvoke Parameter Count Mismatch -



forms - Powershell: BeginInvoke Parameter Count Mismatch -

i trying create powershell script pulls simple gui form, displays "loading..." in title bar while takes 10-20 seconds load data, alter title "please take next options..." after loading.

i've been next this guide pretty much downwards letter. far works, except fact "parameter count mismatch" error when execute line:

$objlistbox.begininvoke( [action[string]] { param($message) $objlistbox.items.add = $message }, $mymessage )

basically i'm trying load 2 one thousand names multiselect listbox, allow users select names want import elsewhere. far works, have nail go on on powershell ise editor, i'd rid of error together.

begininvoke rather older generics in .net framework, , considerably older delegate action<t>. cannot pass instance of action<t> begininvoke.

try casting system.delegate instead.

forms powershell begininvoke

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -