title: How to call a function be called only after a event finished in the same class?
body: <p>I have a class A, which has two functions ("Download" and "query"). When the function "Download" is finished, it will fire the "finish" event. Since the function "query" will use the return info from the finished "Download" function, I want when function "query" is called from a class outside A (e.g., Class B), the function will wait to execute until the "Download" is finished. Class B won't recognize "query" function in A is waiting on the "Download" finish.  In other words, I don't want in class B's download finish event handler to call the "query" function.</p>
  
  <pre><code>   Class A
      {
          public Event finish;
  
          public A()
          {
             Download();
          }
          private void Download ()
          {
             finish(this, new EventArgs());
          } 
  
          public void query ()
          {
          }
     }
  
     Class B
     {
         A a = new A();
         a.query();
     }
  </code></pre>
  
  <p>Thanks,</p>
  
  <p>Wei</p>