Question about using delegates with a string paramater to return a
ListViewItem object...
All,
I have a thread and I want this thread to post messages to the main GUI
thread using a delegate. This is my code fragment:
ListViewItem lview = m_form.Invoke( m_form.m_DelegateAddItem, new object[]
{"hello"} );
This does not compile; m_form is a reference to my main form,
m_DelegateAddItem is obviously my delegate.
I have two questions, how can I pass a string to this delegate and how can I
get the return value back from this delegate?
My delegate is definied as such:
(AddItem is my function for m_DelegateAddItem)
private ListViewItem AddItem( string str )
{
return m_ctrlReq.Items.Add( str );
}
I want to use the listviewitem i get returned to append data to this
specific row in my list box.
Thanks
PT