title: Get string from dll in second window
body: <p>I have a problem read string from a dll file. Below are some listings. I don't know why in window1 I get empty string. In MainWindow I can read from dll file. I want to read this string from dll in window2, window3 ... What to do?</p>
  
  <p>Dll file,</p>
  
  <pre><code>namespace stringTest
  {
      public class DllstringTest
      {
          string string1;
          public string testString
          {
              get
              {
                  return this.string1;
              }
  
              set
              {
                  this.string1 = value;
              }
          }
  
      }
  }  
  </code></pre>
  
  <p>MainWindow application,</p>
  
  <pre><code> public partial class MainWindow : Window
   {
  
      public MainWindow()
      {
          InitializeComponent();
      }
  
      private void button1_Click(object sender, RoutedEventArgs e)
      {
          DllstringTest st = new DllstringTest();
          st.testString = "5";
          Window1 w1 = new Window1();
          w1.Show();
      }
  }
  </code></pre>
  
  <p>Window1,</p>
  
  <pre><code>namespace stringTest_app
  {
      /// &lt;summary&gt;
      /// Interaction logic for Window1.xaml
      /// &lt;/summary&gt;
      public partial class Window1 : Window
      {
          public Window1()
          {
              InitializeComponent();
          }
  
          private void button1_Click(object sender, RoutedEventArgs e)
          {
              DllstringTest st1 = new DllstringTest();
              MessageBox.Show(st1.testString);
  
          }
      }
  }
  </code></pre>