float.IsInfinity()

Determines whether the float evaluates to positive or negative infinity.