M
M
martensit2018-10-19 16:44:32
C++ / C#
martensit, 2018-10-19 16:44:32

How in my case in MVS to make the correct change of the value of the text field?

private void button1_Click(object sender, EventArgs e)
        {
                label1.Text = "Ждем";
                //тут - вычисления, занимающие несколько секунд
                label1.Text = "Готово";
        }

After pressing, it first thinks, then displays the entry "Done",
the entry "We are waiting" is skipped for some reason.
How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LiptonOlolo, 2018-10-19
@martensit

Use async/await

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question