DBNull.IConvertible.ToType(Type, IFormatProvider) 메서드

정의

현재 DBNull 개체를 지정된 형식으로 변환합니다.

 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

현재 DBNull 개체를 변환할 형식입니다.

provider
IFormatProvider

인터페이스를 구현하고 변환을 IFormatProvider 보강하는 데 사용되는 개체입니다. 지정한 경우 null 현재 문화권에서 형식 정보를 가져옵니다.

반품

해당 변환이 지원되는 경우 현재 DBNull 개체에 해당하는 boxed 값입니다. 그렇지 않으면 예외가 throw되고 값이 반환되지 않습니다.

구현

예외

이 변환은 형식에 DBNull 대해 지원되지 않습니다.

typenull입니다.

설명

세 가지 변환이 지원됩니다. 매개 변수가 type 지정 Object 하거나 DBNull반환 값이 현재 DBNull 개체 자체인 경우 매개 변수가 type 지정 String되면 반환 값은 메서드에서 반환되는 ToString 문자열입니다.

적용 대상

추가 정보