This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It looks like you are calling a non static property from a static method. You will need to either make the property static, or create an instance of class | |
static void SetTextboxTextSafe(int result) | |
{ | |
label1.Text = result.ToString(); | |
} | |
or | |
private static void SumData(object state) | |
{ | |
int result; | |
//int[] icount = (int[])state; | |
int icount = (int)state; | |
for (int i = icount; i > 0; i--) | |
{ | |
result += i; | |
System.Threading.Thread.Sleep(1000); | |
} | |
MyClass objMyClass = new MyClass(); | |
objMyClass.setTextboxText(result); | |
} |