How to write an asynchronous method?

Asked

Viewed 503 times

5

I have the following method:

public void Contar()
{
    int numero = 1;

    for (int i = 0; i < 100000; i++)
    {
        numero *= i
    }

    return numero
}

Supposing that the method Contar() take time to lock the UI of my application, as I do to make the asynchronous method?

1 answer

2

Browser other questions tagged

You are not signed in. Login or sign up in order to post.