c# 3.0 - Strange error when using "Double.NaN" and "double.MaxValue" in c# -


i have function in code (c#, net 3.5, visual studio 2008):

public double function calculatesomething() {    ...    double = double.nan; // or double.maxvalue, same behaviour    ... } 

this function called main class, this:

... double res = o.calculatesomething(); ... 

although looks incredible (for me, is) , only on computers (only in 2 computers 60) without special (winxp sp3), if use "alias" (double.nan or double.maxvalue) program broken without kind of error screen when program calls "calculatesomething", whereas if assign particular value, works perfectly.

i mean:

public double function calculatesomething() {    ...    double = double.nan; // faaaail!!!!    double b = -99999; // ok...     ... } 

although change made, program can run on computers, have curiosity. know may happening?. thank you.

ok, found problem:

  • i installed net 4.0, program needed net 3.5. installed net 3.5 , worked.

really, rarest thing, have ever seen.

thank responses.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -