Cannot access a non-static member
hello,
I'm trying to change a value of the textbox within a class, but I get an error:
Quote:
Cannot access a non-static member of outer type 'WindowsFormsApplication1.Form1' via nested type 'WindowsFormsApplication1.Form1.http'
How do I access the textbox? Thanks!
Code:
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public class http
{
void update_text(string data)
{
textBox1.Text = data;
}
}
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}