Single.IsFinite(Single) 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷指定的值是否為有限值(零、次正規或正常)。
public:
static bool IsFinite(float f) = System::Numerics::INumberBase<float>::IsFinite;
public:
static bool IsFinite(float f);
C#
public static bool IsFinite(float f);
static member IsFinite : single -> bool
Public Shared Function IsFinite (f As Single) As Boolean
- f
- Single
單精度浮點數。
如果指定的值是有限值,true
為有限值(零、次正規或正常):否則,false
。
這會有效地檢查值不是 NaN,而不是無限。
產品 | 版本 |
---|---|
.NET | Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Standard | 2.1 |