C # anonymous delegation,
Example:
void updateUI() { if (dateTimePicker1.InvokeRequired) { dateTimePicker1.Invoke((MethodInvoker)delegate { dateTimePicker1.Enabled = true; dateTimePicker1.Checked = false; }); } else { dateTimePicker1.Enabled = true; dateTimePicker1.Checked = false; } }
If anonymous delegation is not required, it is like the following:
delegate void update(); void updateUI() { if (dateTimePicker1.InvokeRequired) { dateTimePicker1.Invoke(new update(() => { dateTimePicker1.Enabled = true; dateTimePicker1.Checked = false; })); } else { dateTimePicker1.Enabled = true; dateTimePicker1.Checked = false; } }
In the C language, what is the symbol (->) and how to use it?
This is a symbol in the struct pointer. Write a program to explain it, for example:
# Include <stdio. h>
Struct STU // define a struct
{
Int num;
} Stu;
Int main ()
{
Struct STU * p; // defines a struct pointer.
P = stu; // p points to the struct variable stu.
Stu. num = 100; // attaches an initial value to the struct member num.
Printf ("% d", p-> num); // output the num value in stu
Return;
}
As you can see, the-> method is to reference the variable in the struct !!
Format: p-> struct member (such as p-> num)
The function is equivalent to stu. num or (* p). num.
I don't know. You don't understand, and don't understand call me. O (∩ _ ∩) O ~
Hope to adopt it.
In the C language, what is the symbol (->) and how to use it?
This is a symbol in the struct pointer. Write a program to explain it, for example:
# Include <stdio. h>
Struct STU // define a struct
{
Int num;
} Stu;
Int main ()
{
Struct STU * p; // defines a struct pointer.
P = stu; // p points to the struct variable stu.
Stu. num = 100; // attaches an initial value to the struct member num.
Printf ("% d", p-> num); // output the num value in stu
Return;
}
As you can see, the-> method is to reference the variable in the struct !!
Format: p-> struct member (such as p-> num)
The function is equivalent to stu. num or (* p). num.
I don't know. You don't understand, and don't understand call me. O (∩ _ ∩) O ~
Hope to adopt it.