math namespace
-
hi ppl i need to use sqrt(), for this i tried to import math namespace but i couldn't get this namespace, but i get math namespace in vb.net.. how could i get math namespace in c#
self confidence+hard work=SUCCESS
Its not a namespace its a class. Use fully qualified name ie System.Math.
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void "Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
-
hi ppl i need to use sqrt(), for this i tried to import math namespace but i couldn't get this namespace, but i get math namespace in vb.net.. how could i get math namespace in c#
self confidence+hard work=SUCCESS
Check the Math class in System namespace. More specifically Math.Sqrt() static method.
Regards, Lev
-
Check the Math class in System namespace. More specifically Math.Sqrt() static method.
Regards, Lev
-
yeah i did, but i couldnt get the math class in system.namespace
self confidence+hard work=SUCCESS
What do you mean you can't get it? It is definitely there ;) If you mean you can't instantiate it, yes you can't, since it is a static class. Usage: System.Math.Sqrt(100); Actually you can omit "System" since the System namespace is being imported automatically.
Regards, Lev
-
What do you mean you can't get it? It is definitely there ;) If you mean you can't instantiate it, yes you can't, since it is a static class. Usage: System.Math.Sqrt(100); Actually you can omit "System" since the System namespace is being imported automatically.
Regards, Lev
-
thanks for your support, i get a system.math.dll file and i import it and its working...:)
self confidence+hard work=SUCCESS
-
hi ppl i need to use sqrt(), for this i tried to import math namespace but i couldn't get this namespace, but i get math namespace in vb.net.. how could i get math namespace in c#
self confidence+hard work=SUCCESS
What about documentation [^], [^]? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
What do you mean you can't get it? It is definitely there ;) If you mean you can't instantiate it, yes you can't, since it is a static class. Usage: System.Math.Sqrt(100); Actually you can omit "System" since the System namespace is being imported automatically.
Regards, Lev
Lev Danielyan wrote:
the System namespace is being imported automatically.
Is it?
-
Lev Danielyan wrote:
the System namespace is being imported automatically.
Is it?
My fault, I meant that some libs are being referenced automatically (mscorlib.dll for example). But this is not the case here :)
Regards, Lev