title: Rules to be followed to get window.external work
body: <p>I found one thing in <code>javascript</code> of my <code>WPF</code> project. It has called </p>
  
  <p><code>window.external.ShowWindow();</code>  </p>
  
  <p>I have found that method is written in class <code>InteropClass</code> like below.</p>
  
  <pre><code>[ComVisible(true)]
  public class InteropClass
  {
      public void ShowWindow()
      {
          // logic
      }
  }
  </code></pre>
  
  <p>and that method is called.
  I am trying to analyse it, for that I have used already built class like below</p>
  
  <pre><code>[ComVisible(true)]
  public partial class AnotherClass : SomeDifferentClass
  {
      public void AnotherMethod()
      {
          // logic
      }
  }
  </code></pre>
  
  <p>and tried to call it as </p>
  
  <p><code>window.external.AnotherMethod();</code>  </p>
  
  <p>but it is not working. Error alert says <blockquote>AnotherMethod is not supported by window.external object</blockquote></p>
  
  <p>I know both classes differs in many terms and I can make it work but my question is <em>What rules to be followed to make this work</em>, may be like class must be directly inherited from <code>Object</code> or some other.</p>