public void LoadData(ClassPointer root, bool runAtWebClient, Type[] paramTypes, string[] pnames, UInt32 initSelected) { _root = root; _paramTypes = paramTypes; _pnames = pnames; _runatwebclient = runAtWebClient; List <VplMethodPointer> methods = root.GetCustomMethodsByParamTypes(runAtWebClient, paramTypes); listBox1.Items.Add(new VplMethodPointer()); foreach (VplMethodPointer m in methods) { int n = listBox1.Items.Add(m); if (initSelected == m.MethodId) { listBox1.SelectedIndex = n; } } }