Hi i have a method as below

 public void sendDataToCleint(ref UpdateClient uc,ref QueryClient qc,ref FailClient fc)
        {
            uc.setValue(false);
            qc.setValue(false);
            fc.setValue(false);

            while (_data.Count != 0)
            {
                string a = dataOUT();

                string[] split = a.Split(new Char[] { ' ' });
                  if (split[1] == "NEW")
                    {                       
                        uc.setValue(true);
                        qc.setValue(false);
                        fc.setValue(false);
                        uc.getData(a); // how do i bring the control back to here
                        break;
                    }
                    else if (split[1] == "QUERY")
                  {


                      Console.WriteLine("writeline");
                        uc.setValue(false);
                        qc.setValue(true);
                        fc.setValue(false);
                        qc.getData(a);
                        break;
                    }
                    else if (split[1] == "FAIL")
                    {
                         uc.setValue(false);
                        qc.setValue(false);
                        fc.setValue(true);
                        fc.getData(a);
                        break;
                    } 

basically what this method does it reads data from another queue and send it to the uc, qc and fc classes.
when i runs first it goes in to NEW if statement and then it sends thae data to uc.getData(a); (this method sends it to a tm class and then it stores the data into another data structure.)

how do i make the control come back, to uc.getData(a) so that it can execure the while statement ???

appreciate a reply,

thanks

Not sure what you mean. When you call uc.getData(a) it processes that method then returns control back to the calling code. The break statement right after that ends the while loop.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.