How do I get mathematics functions

I have just downloaded Visual C# Express. I find that it has no mathematics functions and many others missing such as sleep(). Can someone tell me how I get these. I have looked in the MSDN library at System.Math and can see no way to download the mathematics functions. Is this something that is missing form the Express edition



Answer this question

How do I get mathematics functions

  • Mendelt

    It's because you are still inside the method. label1.Text has been changed but the event to display the change will not be executed until the method exits and returns to the message loop.

    You can make it handle events with:

    Application.DoEvents();

    put that before sleeping, bearing in mind it will execute all events, which could include another button press if you are not careful.



  • Darshan Jani

  • ilengyel

    I had just discovered how to use the Maths functions, for example....

    x = Math.Log(x);

    But as much as I tried I could not find the key to Sleep() but now you have shown me. For example a one second delay......

    System.Threading.Thread.Sleep(1000);

    It did not occur to me to try System.Threading infront of it. Many thanks for your help.


  • El_Dibujante

    colinz plz mark the answer as reply thx

  • umit onal

    I have just tried the code below following a button press.......

    label1.Text = "Start";

    System.Threading.Thread.Sleep(4000);

    label2.Text = "End";

    I click on the button to start the sequence but nothing happens for 4 seconds then both Start and End are displayed. Can you tell me how to display Start then have a 4 second delay before End is displayed. Thanks.


  • How do I get mathematics functions