Mahmood Shahrokni
Mahmood Shahrokni

Reputation: 236

Any suitable substitute for Double.Nan

Our group's head has decided to change all Double types to the Decimal inside the application.The reason is not clear but i think it is because of financial stuff. It seems Decimal is more appropriate than Double. Anyway I am going to change it but i don't know how to treat with this statement :

cellGridFactory.SetValue(HeightProperty, Double.NaN); 

The structure of SetValue is

SetValue(System.Windows.DependencyProperty,object)

I know what Double.NaN means but the problem is there is no Decimal.NaN in C#. This method comes from an external assemly (dll) so i totally can not analyze it. Do you know any suitable substitute for Double.Nan ?

Upvotes: 0

Views: 191

Answers (1)

user743382
user743382

Reputation:

I'm guessing you're severely misinterpreting your group head's decision. Either that, or your group head is an idiot, but I am guessing the former.

Obviously if an external assembly that you have no source code for and no control over expects to receive double values, you cannot change those to decimal. Leave them as double. HeightProperty does not come from your own code, requires double, so must not be changed.

Upvotes: 2

Related Questions