Math Library

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am unable to find System.Math Library. How to add it. I am trying find
squre root of a number
 
I am unable to find System.Math Library. How to add it. I am trying find
squre root of a number

Math is a static class in the System namespace in the mscorlib
library. Unless you have your compilation settings to remove mscorlib
(not smart) you should have it referenced

double result = System.Math.Sqrt(myval);

or

using System;

....

double result = Math.Sqrt(myval);
 
raju,

Math is a class in the System namespace, and is included in
mscorlib.dll. To find the square root of a number, you can easily do this:

double squareRoot = Math.Sqrt(4);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top