thanks!
namespace TRSWin.Inquiry
{
public delegate TOutput MyAsyncMethod
public partial class PositionInquiry : TRSWin.ParentForm
{
public PositionInquiry()
{
InitializeComponent();
}
public bool BindLookup(ref ComboBox myComboBox, object dataSource)
{
myComboBox.DataSource = dataSource;
myComboBox.DisplayMember = "Description";
return true;
}
public void BeginBindLookup(ref ComboBox myComboBox, object dataSource)
{
MyAsyncMethod
method.BeginInvoke(ref myComboBox, dataSource, EndBindLookup, method);
}
public void EndBindLookup(IAsyncResult result)
{
MyAsyncMethod
//bool b = method.EndInvoke(result); // Can't figure out how to make this call either, so I will ignore for now.
}
private void PositionInquiry_Load(object sender, EventArgs e)
{
BindLookup(ref cboSymbol, Cache.SymbolLookup); // Works, populates list
BeginBindLookup(ref cboSymbol, Cache.SymbolLookup); // Runs, but list is empty
}
}
}

Roei BarRank #1,271 · 1.4K reputationPosted Aug 17, 2009, 12:07 PM EDT
here is a sample code
public delegate void InvokeDelegate(); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { Invoke_Click(sender, e); } private void Invoke_Click(object sender, EventArgs e) { cmb.BeginInvoke(new InvokeDelegate(InvokeMethod)); } public void InvokeMethod() { cmb.Items.AddRange(new object[] { 1,2,3,4,5}); }the problem is in your delegate