SignificantDigitsNumberRounder 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將數位四捨五入為指定的有效位數。
public ref class SignificantDigitsNumberRounder sealed : INumberRounder
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SignificantDigitsNumberRounder final : INumberRounder
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class SignificantDigitsNumberRounder final : INumberRounder
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SignificantDigitsNumberRounder : INumberRounder
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class SignificantDigitsNumberRounder : INumberRounder
function SignificantDigitsNumberRounder()
Public NotInheritable Class SignificantDigitsNumberRounder
Implements INumberRounder
- 繼承
- 屬性
- 實作
Windows 需求
裝置系列 |
Windows 10 (已於 10.0.10240.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)
|
建構函式
SignificantDigitsNumberRounder() |
建立 SignificantDigitsNumberRounder 物件。 此建構函式會將 RoundingAlgorithm 初始化為 RoundingAlgorithm的預設值。RoundHalfUp和 SignificantDigits 到 0。 |
屬性
RoundingAlgorithm |
取得或設定這個 SignificantDigitsNumberRounder 物件的四捨五入策略值。 |
SignificantDigits |
取得或設定 這個 SignificantDigitsNumberRounder 物件用於四捨五入的有效位數。 |
方法
RoundDouble(Double) |
將 Double 數位四捨五入為指定的有效位數。 |
RoundInt32(Int32) |
將 Int32 數位四捨五入為指定的有效位數。 |
RoundInt64(Int64) |
將 Int64 數位四捨五入為指定的有效位數。 |
RoundSingle(Single) |
將 單 一數位四捨五入為指定的有效位數。 |
RoundUInt32(UInt32) |
將 UInt32 數位四捨五入為指定的有效位數。 |
RoundUInt64(UInt64) |
將 UInt64 數位四捨五入為指定的有效位數。 |