c# - Update treeview by sending multiple objects to invoke delegate method -


I am trying to update a previewview but I got an error that I can not convert ob to string .

I am creating a type of scanner that uses multiple threads, once each item is checked I want to invite a representative to update the treeview with new information . I am able to easily update the information if I invoke the method with only one object, but as soon as I try with a string, I get an error.

Here's how I am doing this:

  Public Representative Zero String Delegate (string input, string address); Public Zero UpdateScan (String Input, String IP) {Treeode TreeNode = New Triode (Input); If (OutputTree.Nodes.ContainsKey (input)) // Add our parent node output. Node.ed (treeoid); // Add Our Baby Node Tree Node Nodes.ed (ip); } Else {// Add node tree only node. Node.ed (ip); }} Public Zero ScanItem () {// Scan Code // Results Code String Output = "The Outcome of Results"; // Invite our callback object [] obj = new object [1]; Obj [0] = outPut; OutputTree.BeginInvoke (new stringdelegate (updatezain), OBJ, IP.Tostring ()); }   

Can anyone show me where I am going?

You are explicitly adding an object to call.

Change

  object [] obj = new object [1]; Obj [0] = outPut; OutputTree.BeginInvoke (new stringdelegate (updatezain), OBJ, IP.Tostring ());   

to

  outputTree.BeginInvoke (new string delimit (updatezain), output, IP. ToString ());    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -