Byte.IConvertible.ToType(Type, IFormatProvider) 方法

定義

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

 virtual System::Object ^ System.IConvertible.ToType(Type ^ type, IFormatProvider ^ provider) = IConvertible::ToType;
object IConvertible.ToType (Type type, IFormatProvider provider);
abstract member System.IConvertible.ToType : Type * IFormatProvider -> obj
override this.System.IConvertible.ToType : Type * IFormatProvider -> obj
Function ToType (type As Type, provider As IFormatProvider) As Object Implements IConvertible.ToType

參數

type
Type

Byte 值轉換所得的類型。The type to which to convert this Byte value.

provider
IFormatProvider

IFormatProvider 實作,提供傳回值格式的相關資訊。An IFormatProvider implementation that supplies information about the format of the returned value.

傳回

Object

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

實作

例外狀況

typenulltype is null.

不支援要求的類型轉換。The requested type conversion is not supported.

備註

這個成員是明確介面成員實作,This member is an explicit interface member implementation. 只有在 Byte 執行個體轉換成 IConvertible 介面時,才能使用這個成員。It can be used only when the Byte instance is cast to an IConvertible interface. 建議的替代做法是改為 static Shared 在 Visual Basic) 方法中呼叫 (Convert.ChangeTypeThe recommended alternative is to call the static (Shared in Visual Basic) Convert.ChangeType method instead.

適用於