Original Post
namespace Socket
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Post post = new Post();
post.write();
}
}
public class Post : Form1
{
public void write()
{
[...]
log(textbox1, "Shutting Down");
}
public void log(TextBox target, string output)
{
target.Text = output;
}
}
}
Let's say that textbox1 is a textbox and button1 a button, why this piece of code doesn't work? the textbox remains blank!