Does anyone know how I can check for NaN? I have this function which works well, except for when Votes and TotalVotes are both equal to 0.
Public Function CalculatePercentage(ByVal Votes As Integer, ByVal TotalVotes As Integer)
Calculate = Math.Round(Votes / TotalVotes * 100)
Calculate = Convert.ToInt32(Calculate)