共用方式為


SignificantDigitsNumberRounder 類別

定義

將數位四捨五入為指定的有效位數。

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
繼承
Object Platform::Object IInspectable SignificantDigitsNumberRounder
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

建構函式

SignificantDigitsNumberRounder()

建立 SignificantDigitsNumberRounder 物件。

此建構函式會將 RoundingAlgorithm 初始化為 RoundingAlgorithm的預設值。RoundHalfUpSignificantDigits 到 0。

屬性

RoundingAlgorithm

取得或設定這個 SignificantDigitsNumberRounder 物件的四捨五入策略值。

SignificantDigits

取得或設定 這個 SignificantDigitsNumberRounder 物件用於四捨五入的有效位數。

方法

RoundDouble(Double)

Double 數位四捨五入為指定的有效位數。

RoundInt32(Int32)

Int32 數位四捨五入為指定的有效位數。

RoundInt64(Int64)

Int64 數位四捨五入為指定的有效位數。

RoundSingle(Single)

一數位四捨五入為指定的有效位數。

RoundUInt32(UInt32)

UInt32 數位四捨五入為指定的有效位數。

RoundUInt64(UInt64)

UInt64 數位四捨五入為指定的有效位數。

適用於

另請參閱