namespace WindowsTestApplication { public partial class MainForm : Form { public int publicInt = 0; private string privateString = "Hello"; public MainForm() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Form oSubForm = new Form(); oSubForm.Show(); } } }
namespace WindowsTestApplication { public partial class SubForm : Form { public SubForm() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { // Want to reference MainForm here. } } }Thought in the above I would be able to see 'publicInt' but not see 'privateString', but I can't see either.