473,499 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Infinite value?

ORC
I've read somewhere that C# has an representation of the Infinite value but
don't remember where. I need to set a double to Infinite - how to do that?
dValue = Inf; ???

Will an old Visual Basic program that imports the data from my program be
able to understand the 'Infinite' value?

Thanks
Ole
Nov 16 '05 #1
5 11493
Hi Ole,

You are looking for Double.PositiveInfinity or Double.NegativeInfinity.
I don't know if this is the same as the old Visual Basic infinity.

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #2
ORC
Great. thanks Morten!
"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:opshr42e0oklbvpo@pbn_computer...
Hi Ole,

You are looking for Double.PositiveInfinity or Double.NegativeInfinity.
I don't know if this is the same as the old Visual Basic infinity.

--
Happy Coding!
Morten Wennevik [C# MVP]

Nov 16 '05 #3
RC
Just curious... what would such a value be used for in an application?

-RC
"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:opshr42e0oklbvpo@pbn_computer...
Hi Ole,

You are looking for Double.PositiveInfinity or Double.NegativeInfinity.
I don't know if this is the same as the old Visual Basic infinity.

--
Happy Coding!
Morten Wennevik [C# MVP]

Nov 16 '05 #4
Approximating functions in calculus.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"RC" <a@b.com> wrote in message news:uL**************@TK2MSFTNGP10.phx.gbl...
Just curious... what would such a value be used for in an application?

-RC
"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:opshr42e0oklbvpo@pbn_computer...
Hi Ole,

You are looking for Double.PositiveInfinity or Double.NegativeInfinity.
I don't know if this is the same as the old Visual Basic infinity.

--
Happy Coding!
Morten Wennevik [C# MVP]


Nov 16 '05 #5
ORC
Exactly!

"Justin Rogers" <Ju****@games4dotnet.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Approximating functions in calculus.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"RC" <a@b.com> wrote in message

news:uL**************@TK2MSFTNGP10.phx.gbl...
Just curious... what would such a value be used for in an application?

-RC
"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:opshr42e0oklbvpo@pbn_computer...
Hi Ole,

You are looking for Double.PositiveInfinity or Double.NegativeInfinity.
I don't know if this is the same as the old Visual Basic infinity.

--
Happy Coding!
Morten Wennevik [C# MVP]



Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
12968
by: Bartosz Wegrzyn | last post by:
I use onblue event to validate fields in my form. I do this onblur="return isname()" and so so ... I have one form with 20 fields. My problem is that when the focus is for example on the...
43
5525
by: Gremlin | last post by:
If you are not familiar with the halting problem, I will not go into it in detail but it states that it is impossible to write a program that can tell if a loop is infinite or not. This is a...
1
5189
by: Jim P. | last post by:
I'm having trouble returning an object from an AsyncCallback called inside a threaded infinite loop. I'm working on a Peer2Peer app that uses an AsyncCallback to rerieve the data from the remote...
4
1350
by: Gregory Piñero | last post by:
Hi, Would anyone be able to tell me why my function below is getting stuck in infinite recusion? Maybe I'm just tired and missing something obvious? def...
5
2401
by: marcsirois | last post by:
I have an SQL Query that looks like this. I simplified it for the purpose of this example, but it's still a runnable query SELECT TOP 1 FundedPositions.PositionNumber AS , (select top 1...
33
3011
by: dmoran21 | last post by:
Hi all, I am a mathematician and I'm trying to write a program to try out a formula that I've derived. However, it seems that I've got an infinite loop and I don't quite understand why. I was...
9
3479
by: haijin.biz | last post by:
why the following program using "char" gives me an infinite loop? If I change char to int, it works fine. #include <iostream> using namespace std; int main(int argc, char** argv) { for(char...
10
2332
by: bhipwell via AccessMonster.com | last post by:
Hello, I am stuck on this one. To illustrate my point, I will use cars as my example. I have a text field for which users can enter in anything they want. This particular field holds the...
0
7012
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7225
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3105
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3101
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.