Decimal.IConvertible.ToUInt64(IFormatProvider) Decimal.IConvertible.ToUInt64(IFormatProvider) Decimal.IConvertible.ToUInt64(IFormatProvider) Method

定義

重要

此 API 不符合 CLS 規範。

如需這個成員的說明,請參閱 ToInt64(IFormatProvider)For a description of this member, see ToInt64(IFormatProvider).

 virtual System::UInt64 System.IConvertible.ToUInt64(IFormatProvider ^ provider) = IConvertible::ToUInt64;
[System.CLSCompliant(false)]
ulong IConvertible.ToUInt64 (IFormatProvider provider);
Function ToUInt64 (provider As IFormatProvider) As ULong Implements IConvertible.ToUInt64

參數

provider
IFormatProvider IFormatProvider IFormatProvider

這個參數已忽略。This parameter is ignored.

傳回

目前執行個體的值,轉換為 UInt64The value of the current instance, converted to a UInt64.

實作

例外狀況

產生的整數值小於 MinValue 或大於 MaxValueThe resulting integer value is less than MinValue or greater than MaxValue.

備註

這個成員是明確介面成員實作,This member is an explicit interface member implementation. 只有在 Decimal 執行個體轉換成 IConvertible 介面時,才能使用這個成員。It can be used only when the Decimal instance is cast to an IConvertible interface. 建議的替代做法是呼叫Decimal.ToUInt64方法Convert.ToUInt64或方法。The recommended alternative is to call either the Decimal.ToUInt64 method or the Convert.ToUInt64 method.

Decimal值會向零進位到最接近的整數值。The Decimal value is rounded toward zero to the nearest integer value.

適用於