DBNull.IConvertible.ToType(Type, IFormatProvider) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts the current DBNull object to the specified type.
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
- provider
- IFormatProvider
An object that implements the IFormatProvider interface and is used to augment the conversion. If null
is specified, format information is obtained from the current culture.
The boxed equivalent of the current DBNull object, if that conversion is supported; otherwise, an exception is thrown and no value is returned.
This conversion is not supported for the DBNull type.
type
is null
.
Three conversions are supported: If the type
parameter specifies Object or DBNull, the return value is the current DBNull object itself. If the type
parameter specifies String, the return value is the string returned by the ToString method.
제품 | 버전 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET 피드백
.NET은(는) 오픈 소스 프로젝트입니다. 다음 링크를 선택하여 피드백을 제공해 주세요.