18 implementations of ToDateTime
Microsoft.Gen.Logging.Generated.Tests (1)
parent\TestClasses\FormattableTestExtensions.cs (1)
34
public readonly DateTime
ToDateTime
(IFormatProvider? provider) => throw new NotSupportedException();
System.Private.CoreLib (17)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
391
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
241
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
649
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
1966
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider) => this;
src\runtime\src\libraries\System.Private.CoreLib\src\System\DBNull.cs (1)
107
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1094
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
515
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2191
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider) => throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Enum", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
244
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
259
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
256
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
247
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
508
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.cs (1)
697
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
238
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
254
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
253
DateTime IConvertible.
ToDateTime
(IFormatProvider? provider)
36 references to ToDateTime
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\ComInterop\DynamicVariantExtensions.cs (1)
73
case TypeCode.DateTime: variant = ComVariant.Create(value.
ToDateTime
(ci)); break;
Microsoft.VisualBasic.Core (14)
Microsoft\VisualBasic\CompilerServices\Conversions.vb (3)
2011
Return CDate(ValueInterface.
ToDateTime
(Nothing))
2301
Return CStr(ValueInterface.
ToDateTime
(Nothing))
2435
Case TypeCode.DateTime : Return iconv.
ToDateTime
(Nothing)
Microsoft\VisualBasic\CompilerServices\DateType.vb (1)
48
Return ValueInterface.
ToDateTime
(Nothing)
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (9)
560
Return ObjTstDateTime(conv1.
ToDateTime
(Nothing), DateType.FromObject(Nothing))
563
Return ObjTstDateTime(DateType.FromObject(Nothing), conv2.
ToDateTime
(Nothing))
602
Return ObjTstDateTime(CDate(conv1.
ToDateTime
(Nothing)), conv2.
ToDateTime
(Nothing))
605
Return ObjTstDateTime(CDate(conv1.
ToDateTime
(Nothing)), conv2.
ToDateTime
(Nothing))
608
Return ObjTstDateTime(DateType.FromString(conv1.ToString(Nothing), GetCultureInfo()), conv2.
ToDateTime
(Nothing))
611
Return ObjTstDateTime(conv1.
ToDateTime
(Nothing), DateType.FromString(conv2.ToString(Nothing), GetCultureInfo()))
3680
Return iconv.
ToDateTime
(Nothing)
Microsoft\VisualBasic\CompilerServices\StringType.vb (1)
145
Return FromDate(ValueInterface.
ToDateTime
(Nothing))
System.Data.Common (3)
System\Data\Common\DateTimeStorage.cs (2)
128
value = ((IConvertible)value).
ToDateTime
(FormatProvider);
165
DateTime tmpValue = ((IConvertible)value).
ToDateTime
(FormatProvider);
System\Data\Common\SQLConvert.cs (1)
541
return ((IConvertible)(string)value).
ToDateTime
(formatProvider);
System.Private.CoreLib (18)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (18)
158
TypeCode.DateTime => v.
ToDateTime
(provider),
205
return value.
ToDateTime
(provider);
277
return ic.
ToDateTime
(provider);
1773
return value == null ? DateTime.MinValue : ((IConvertible)value).
ToDateTime
(null);
1778
return value == null ? DateTime.MinValue : ((IConvertible)value).
ToDateTime
(provider);
1798
return ((IConvertible)value).
ToDateTime
(null);
1803
return ((IConvertible)value).
ToDateTime
(null);
1808
return ((IConvertible)value).
ToDateTime
(null);
1814
return ((IConvertible)value).
ToDateTime
(null);
1819
return ((IConvertible)value).
ToDateTime
(null);
1825
return ((IConvertible)value).
ToDateTime
(null);
1830
return ((IConvertible)value).
ToDateTime
(null);
1836
return ((IConvertible)value).
ToDateTime
(null);
1841
return ((IConvertible)value).
ToDateTime
(null);
1846
return ((IConvertible)value).
ToDateTime
(null);
1851
return ((IConvertible)value).
ToDateTime
(null);
1856
return ((IConvertible)value).
ToDateTime
(null);
1861
return ((IConvertible)value).
ToDateTime
(null);