Hi!
I want to read two properties from a worker thread. Here it is an example of the class:
public partial class FrmPrincipal : Form
{
private int Height;
private int Width;
private string token;
public FrmPrincipal()
{
InitializeComponent();
...
}
private void menuItem1_Click(object sender, EventArgs e)
{
Thread t = new Thread(RequestImage);
t.Start();
}
private void RequestImage()
{
try
{
...
// I want to read these properties
int alto = this.Height;
int ancho = this.Width;
this.token = "...";
...
}
catch (Exception ex)
{
...
}
}
When menuItem1_Click it's executed it's starts a new thread using method RequestImage. In this method I need to read this.Height and this.Width and update the value of this.token.
How can I do this?
I'm programming an app for windows mobile (Compact Framework 2.0).
Thanks!