Passing data between C# forms
<p>I am struggling to pass data between two forms (all I want to do is have a textbox in Form1, and show that textbox value in textbox1, which is located in Form2). How would I go about this, using WPF? Have looked at quite a few solutions, but cannot seem to get any of them at all to work.</p>

<p>For the form in which I'm wanting to display the values (in tbd.Text), here is the code:</p>

<pre><code>namespace test
{
    /// &lt;summary&gt;
    /// Interaction logic for OptionDisplayWindow.xaml
    /// &lt;/summary&gt;
    public partial class OptionDisplayWindow : Window
    {
        public OptionDisplayWindow()
        {

            InitializeComponent();
            tbd.Text = "k"; //want to change this value based on "s" in the other form

        }
</code></pre>

<p>The form in which the text is transferred from (want to display the string):</p>

<pre><code>public void Button1_Click(object sender, RoutedEventArgs e)
        {
            string s = "testText"


       }
</code></pre>

<p>I have tried every single other answer on SO (spent the past 6 hours trying) and have had absolutely no luck.</p>

<p>EDIT 2: Using the method listed as the best answer here <a href="https://stackoverflow.com/questions/1559770/send-values-from-one-form-to-another-form">Send values from one form to another form</a> I've come up with this code for Form1: </p>

<pre><code>private void ttbtn_Click(object sender, RoutedEventArgs e)
        {
            using (Form2 form2 = new Form2())
            { 
                tbd.Text = form2.TheValue;
                }
            }
</code></pre>

<p>And the code for Form2: </p>

<pre><code>        public string TheValue
        {
            get { return arrayTest.Text; }
        }
</code></pre>

<p>However, I'm getting the error 'Form 2': type used in a using statement must be implicitly convertible to 'System.IDisposable'. </p>