|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
BeginInvoke on MulticaseDelegate and params keyword...Hello,
If I use params keyword in my multicast delegate, can I call it using BeginInvoke? BeginInvoke takes some parameters after params keyword. I'm confused how to pass them after params... Thanks! Zhenxin Li Just do what intellisense tells you.
params is just a caller convenience. It's really just an array. delegate void D(params int[] p); D d; d.BeginInvoke(new int[]{1,2,3},cb,o); Note that the arguments are NOT params in BeginInvoke so you can write d(1,2,3) but not d.BeginInvoke(1,2,3,cb,o) "Zhenxin Li" <imz***@hotmail.com> wrote in message news:%23wQS8rdXGHA.1084@TK2MSFTNGP04.phx.gbl... If I use params keyword in my multicast delegate, can I call it using BeginInvoke? BeginInvoke takes some parameters after params keyword. I'm confused how to pass them after params...Hello, Thanks! Zhenxin Li# Yes. I was confused by intellisense. Thank you!
"Nick Hounsome" <nh***@nickhounsome.me.uk> wrote in message news:m_1%f.37269$8Q3.33216@fe1.news.blueyonder.co.uk... Just do what intellisense tells you.params is just a caller convenience. It's really just an array. delegate void D(params int[] p); D d; d.BeginInvoke(new int[]{1,2,3},cb,o); Note that the arguments are NOT params in BeginInvoke so you can write d(1,2,3) but not d.BeginInvoke(1,2,3,cb,o) "Zhenxin Li" <imz***@hotmail.com> wrote in message news:%23wQS8rdXGHA.1084@TK2MSFTNGP04.phx.gbl... Hello,If I use params keyword in my multicast delegate, can I call it using BeginInvoke? BeginInvoke takes some parameters after params keyword. I'm confused how to pass them after params... Thanks! Zhenxin Li# |
|||||||||||||||||||||||