40 references to InvalidCastException
Crossgen2Tasks (1)
CommonFilePulledFromSdkRepo\MessageLevel.cs (1)
26=> level >= 0 ? (MessageImportance)level : throw new InvalidCastException();
Microsoft.Diagnostics.DataContractReader.Legacy (10)
ClrDataFrame.cs (1)
463throw new InvalidCastException(); // E_NOINTERFACE
ClrDataMethodInstance.cs (3)
411throw new InvalidCastException(); 511throw new InvalidCastException(); 560throw new InvalidCastException(); // E_NOINTERFACE
ClrDataValue.cs (5)
112throw new InvalidCastException(); // E_NOINTERFACE 145throw new InvalidCastException(); // E_NOINTERFACE 176throw new InvalidCastException(); // E_NOINTERFACE 462throw new InvalidCastException(); 521throw new InvalidCastException();
SOSDacImpl.IXCLRDataProcess.cs (1)
336throw new InvalidCastException();
Microsoft.DotNet.ApiCompat.Task (1)
src\sdk\src\Tasks\Common\MessageLevel.cs (1)
26=> level >= 0 ? (MessageImportance)level : throw new InvalidCastException();
Microsoft.Extensions.Http.Resilience.Tests (3)
Polly\HttpCircuitBreakerStrategyOptionsTests.cs (1)
22new object[] { new InvalidCastException(), false },
Polly\HttpClientResiliencePredicatesTests.cs (1)
19new object[] { new InvalidCastException(), false },
Polly\HttpRetryStrategyOptionsTests.cs (1)
24new object[] { new InvalidCastException(), null!, false },
Microsoft.NET.Build.Extensions.Tasks (1)
src\sdk\src\Tasks\Common\MessageLevel.cs (1)
26=> level >= 0 ? (MessageImportance)level : throw new InvalidCastException();
Microsoft.NET.Build.Tasks (1)
src\sdk\src\Tasks\Common\MessageLevel.cs (1)
26=> level >= 0 ? (MessageImportance)level : throw new InvalidCastException();
Microsoft.Private.Windows.Core (4)
Windows\Win32\Foundation\HandleRef.cs (2)
53throw new InvalidCastException(); 64throw new InvalidCastException();
Windows\Win32\System\Variant\VARIANT.cs (2)
967=> value.vt == VT_UNKNOWN ? value.data.punkVal : throw new InvalidCastException(); 982private static T ThrowInvalidCast<T>() => throw new InvalidCastException();
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\Utils.vb (1)
90Throw New Global.System.InvalidCastException()
NuGet.ProjectModel (4)
JsonTextReaderExtensions.cs (2)
33throw new InvalidCastException(); 208throw new InvalidCastException();
src\nuget-client\build\Shared\Utf8JsonReaderExtensions.cs (1)
29throw new InvalidCastException();
src\nuget-client\build\Shared\Utf8JsonStreamReader.cs (1)
257throw new InvalidCastException();
System.CommandLine (1)
Binding\ArgumentConverter.cs (1)
33throw new InvalidCastException();
System.Data.Odbc (1)
Common\System\Data\Common\AdapterUtil.Odbc.cs (1)
70InvalidCastException e = new InvalidCastException();
System.Data.OleDb (1)
System\Data\Common\AdapterUtil.cs (1)
154InvalidCastException e = new InvalidCastException();
System.Linq.Expressions (2)
System\Linq\Expressions\Interpreter\TypeOperations.cs (2)
308throw new InvalidCastException(); 313throw new InvalidCastException();
System.Private.CoreLib (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (1)
1686throw new InvalidCastException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (1)
793return new System.InvalidCastException();
System\RuntimeExceptionHelpers.cs (1)
90return new InvalidCastException();
System\TypedReference.cs (1)
88static void ThrowInvalidCastException() => throw new InvalidCastException();
System.Private.Windows.Core (4)
Windows\Win32\Foundation\HandleRef.cs (2)
53throw new InvalidCastException(); 64throw new InvalidCastException();
Windows\Win32\System\Variant\VARIANT.cs (2)
967=> value.vt == VT_UNKNOWN ? value.data.punkVal : throw new InvalidCastException(); 982private static T ThrowInvalidCast<T>() => throw new InvalidCastException();
System.Reflection.Metadata (1)
System\Reflection\Throw.cs (1)
17throw new InvalidCastException();