title: C# webBrowser InvokeScript namespace specification
body: <p>I am writing a c# program, which is used for generating an HTML file and calls a JavaScript function when a button is clicked in the WPF project. However, when I use the  function, it throws an error.</p>
  
  <p>Error message:
  A using namespace directive can only be applied to namespaces; 
  'System.Object' is a type not a namespace</p>
  
  <p>Part of my code:</p>
  
  <pre>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Windows;
  using System.Windows.Controls;
  using System.Windows.Data;
  using System.Windows.Documents;
  using System.Windows.Input;
  using System.Windows.Media;
  using System.Windows.Media.Imaging;
  using System.Windows.Navigation;
  using System.Windows.Shapes;
  using System.IO;
  using System.Windows.Forms;
  using System.Object;
  
  namespace HTMLtesting
  {
      public partial class MainWindow : Window
      {
  
          public MainWindow()
          {
              InitializeComponent();
              createHTMLPage();
          }
  
          private void stopButton_Click(object sender, RoutedEventArgs e)
          {
              webBrowser1.Document.InvokeScript("stopPlaying");
          }</pre>