I'm looking for a code to check if an element of my array of double is empty. I tried with isNaN
, string.isNullOrEmpty
and 0.0D
but nothing to do, I still have this text : Not a Number.
So, do you know any code in C# which is able to check if an element in a an array of double is empty?
Here is my code:
if (!Double.IsNaN(d1.getChiffreAffaireBase()[keyIndex1]))
{
textBox43.Text = calcMargeCa(d1.getChiffreAffaireBase()[keyIndex1], d1.getChiffreAffairePlus()[keyIndex1]).ToString("0.00");
textBox44.Text = calcMargeCa(d1.getChiffreAffaireBase()[keyIndex1+1], d1.getChiffreAffairePlus()[keyIndex1+1]).ToString("0.00");
}
else
{
label13.Hide();
textBox43.Hide();
textBox44.Hide();
}