This code makes no sense: you call method 'fun1 with two arguments, but method 'fun1 takes no parameters. All your methods, and the delegate, are defined outside the scope of the Main method: what is the enclosing Class ?
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
i am sorry,indeed i am a beginner.
I don't know how to meet my requirement. My requirement as follows:
I want to code an optimization algrithm function to calculate Minimized value. It can input function that needed optimization, like fun2 or fun3 ,etc... that i said. It means if i input fun2 to optimization function ,it can search fun2's Minimized value, if input fun3, it can search fun3's Minimized value.But fun2 and fun3 or other functions don't have same style input variable,their input variable style and number is not same.
how can i realize it?
Thank you very much,it 's near my requirement.
But one more requirement is that:
static void fun1(int x, Action call)
take fun3(y,z) for example, call() is run fun3(y,z).
but if i want to run fun3(x,z) ,how to realize it? you know ,i want to change y value in fun1 to call fun2(int y) or fun3(int y,int z),because my code use loop to change y value in fun1,to let fun2 or fun3 be a minimum value.
Great Job!!! Thank you very much.
And i have other question bothering me.
I have to use chart control to plot 10 series including 1000 points per series in one chartarea. But after ploting, mouse move or zoom in or ContextMenuStrip operation is very slow and delay. I think maybe paint problem.
When i ask before, i get the answer is point number is too big.
But i found that if i plot 200 series with 1 point for example as follows, the operation is also slow. How can treat it?
Hi, i have another question...
If i want to use multi-thread to call fun1, how can i input the variable x, y,z?
static void Main()
int x = 1;
int z = 3;
Thread th=new Thread(fun1( ? )) //how can i do ?
// fun1(x, y => fun2(y));
// fun1(x, y => fun3(y, z));
Good Idea,i meet it.
And if i have a button at main Thread , it can abort Thread "th". How to code button click function?
And, if whether Thread th end or abort, i want to run" MessageBox.Show("Thread end")", how can i do it?