Click here to Skip to main content
15,886,798 members

Comments by Goaty65109 (Top 2 by date)

Goaty65109 1-Oct-15 19:52pm View    
Ok this looks like it will do what I want, but that's with two forms. I don't seem to be able to make this happen sending textBox1.Text data to a class I have called MySQL. See my updated question for more code examples I have (using your technique, that might help get this rolling).
Goaty65109 30-Sep-15 13:23pm View    
Here's what I have in the form:

public string username
{
get { return txtUsername.Text; }
set { txtUsername.Text = value; }
}

From what I understand that sets up the variable - username - to be accessible from sources outside the form correct?

And to call this variable I tried this in the class file:

private string uid;

uid = Form1.username;

^^^ this is what is extremely wrong. I think I am referencing the public string incorrectly.