99 instantiations of InvalidCastException
mscorlib (88)
system\boolean.cs (2)
242throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Boolean", "Char")); 302throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Boolean", "DateTime"));
system\byte.cs (1)
255throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Byte", "DateTime"));
system\char.cs (5)
435throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Char", "Boolean")); 485throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Char", "Single")); 490throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Char", "Double")); 495throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Char", "Decimal")); 500throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Char", "DateTime"));
system\convert.cs (8)
213throw new InvalidCastException(Environment.GetResourceString("InvalidCast_IConvertible")); 253throw new InvalidCastException(Environment.GetResourceString("InvalidCast_DBNull")); 255throw new InvalidCastException(Environment.GetResourceString("InvalidCast_Empty")); 313throw new InvalidCastException(Environment.GetResourceString("InvalidCast_DBNull")); 315throw new InvalidCastException(Environment.GetResourceString("InvalidCast_Empty")); 318throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", value.GetType().FullName, targetType.FullName)); 333throw new InvalidCastException(Environment.GetResourceString("InvalidCast_CannotCastNullToValueType")); 343throw new InvalidCastException(Environment.GetResourceString("InvalidCast_IConvertible"));
system\datetime.cs (13)
1580throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Boolean")); 1585throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Char")); 1590throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "SByte")); 1595throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Byte")); 1600throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Int16")); 1605throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "UInt16")); 1610throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Int32")); 1615throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "UInt32")); 1620throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Int64")); 1625throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "UInt64")); 1630throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Single")); 1635throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Double")); 1640throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Decimal"));
system\dbnull.cs (14)
49throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 54throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 59throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 64throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 69throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 74throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 79throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 84throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 89throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 94throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 99throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 104throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 109throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull")); 114throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromDBNull"));
system\decimal.cs (2)
1208throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Decimal", "Char")); 1268throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Decimal", "DateTime"));
system\double.cs (2)
309throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Double", "Char")); 369throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Double", "DateTime"));
system\enum.cs (1)
1032throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Enum", "DateTime"));
system\int16.cs (1)
268throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Int16", "DateTime"));
system\int32.cs (1)
241throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Int32", "DateTime"));
system\int64.cs (1)
220throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Int64", "DateTime"));
system\runtime\interopservices\windowsruntime\clripropertyvalueimpl.cs (25)
135throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Char16"), __HResults.TYPE_E_TYPEMISMATCH); 144throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Boolean"), __HResults.TYPE_E_TYPEMISMATCH); 159throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Inspectable"), __HResults.TYPE_E_TYPEMISMATCH); 176throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "DateTime"), __HResults.TYPE_E_TYPEMISMATCH); 185throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "TimeSpan"), __HResults.TYPE_E_TYPEMISMATCH); 195throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Point"), __HResults.TYPE_E_TYPEMISMATCH); 206throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Size"), __HResults.TYPE_E_TYPEMISMATCH); 217throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Rect"), __HResults.TYPE_E_TYPEMISMATCH); 281throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Char16[]"), __HResults.TYPE_E_TYPEMISMATCH); 290throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Boolean[]"), __HResults.TYPE_E_TYPEMISMATCH); 305throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Inspectable[]"), __HResults.TYPE_E_TYPEMISMATCH); 320throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "DateTimeOffset[]"), __HResults.TYPE_E_TYPEMISMATCH); 329throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "TimeSpan[]"), __HResults.TYPE_E_TYPEMISMATCH); 339throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Point[]"), __HResults.TYPE_E_TYPEMISMATCH); 350throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Size[]"), __HResults.TYPE_E_TYPEMISMATCH); 362throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, "Rect[]"), __HResults.TYPE_E_TYPEMISMATCH); 377throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", this.Type, typeof(T).MakeArrayType().Name), __HResults.TYPE_E_TYPEMISMATCH); 391Exception e = new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueArrayCoersion", this.Type, typeof(T).MakeArrayType().Name, i, elementCastException.Message), elementCastException); 414throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", type, typeof(T).Name), __HResults.TYPE_E_TYPEMISMATCH); 437throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", type, typeof(T).Name), __HResults.TYPE_E_TYPEMISMATCH); 440throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", type, typeof(T).Name), __HResults.TYPE_E_TYPEMISMATCH); 443throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueCoersion", type, value, typeof(T).Name), __HResults.DISP_E_OVERFLOW); 483throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", type, typeof(T).Name), __HResults.TYPE_E_TYPEMISMATCH); 518throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", _data.GetType(), expectedBoxedType.Name), __HResults.TYPE_E_TYPEMISMATCH); 540throw new InvalidCastException(Environment.GetResourceString("InvalidCast_WinRTIPropertyValueElement", _data.GetType(), expectedArrayElementType.MakeArrayType().Name), __HResults.TYPE_E_TYPEMISMATCH);
system\runtime\remoting\realproxy.cs (2)
552throw new InvalidCastException( 562throw new InvalidCastException(
system\runtime\remoting\remotingservices.cs (1)
1459throw new InvalidCastException(
system\sbyte.cs (1)
276throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "SByte", "DateTime"));
system\single.cs (2)
279throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Single", "Char")); 339throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "Single", "DateTime"));
system\uint16.cs (1)
243throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "UInt16", "DateTime"));
system\uint32.cs (1)
225throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "UInt32", "DateTime"));
system\uint64.cs (1)
220throw new InvalidCastException(Environment.GetResourceString("InvalidCast_FromTo", "UInt64", "DateTime"));
system\variant.cs (3)
575throw new InvalidCastException(Environment.GetResourceString("InvalidCast_CannotCoerceByRefVariant")); 580throw new InvalidCastException(Environment.GetResourceString("InvalidCast_CannotCoerceByRefVariant")); 684throw new InvalidCastException(Environment.GetResourceString("InvalidCast_CannotCoerceByRefVariant"));
PresentationFramework (1)
src\Framework\System\Windows\Interop\DynamicScriptObject.cs (1)
489throw new ArgumentException(member, new InvalidCastException(comException.Message, hr.Code));
System.Activities.Presentation (2)
System.Activities.Presentation\System\Activities\Presentation\Xaml\ActivityBuilderHelper.cs (2)
33throw FxTrace.Exception.AsError(new InvalidCastException(astAsModelItem.ItemType.FullName)); 39throw FxTrace.Exception.AsError(new InvalidCastException(input.GetType().FullName));
System.Data (5)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Xaml\ActivityBuilderHelper.cs (2)
33throw FxTrace.Exception.AsError(new InvalidCastException(astAsModelItem.ItemType.FullName)); 39throw FxTrace.Exception.AsError(new InvalidCastException(input.GetType().FullName));
fx\src\data\System\Data\Common\AdapterUtil.cs (3)
202InvalidCastException e = new InvalidCastException(error, inner); 256InvalidCastException e = new InvalidCastException(); 1608e = new InvalidCastException(message, inner);
System.Data.DataSetExtensions (1)
System\Data\DataSetUtil.cs (1)
61return TraceExceptionAsReturnValue(new InvalidCastException(message));
System.Workflow.Activities (1)
Rules\Executor.cs (1)
804throw new InvalidCastException(message);
System.Workflow.ComponentModel (1)
AuthoringOM\Serializer\ActivitySurrogate.cs (1)
352throw new InvalidCastException();
230 references to InvalidCastException
mscorlib (29)
microsoft\win32\registrykey.cs (1)
1593catch (InvalidCastException) {
system\Collections\Concurrent\ConcurrentDictionary.cs (1)
1510catch (InvalidCastException)
system\collections\generic\dictionary.cs (4)
638catch (InvalidCastException) { 642catch (InvalidCastException) { 668catch (InvalidCastException) { 672catch (InvalidCastException) {
system\collections\generic\list.cs (3)
210catch (InvalidCastException) { 233catch (InvalidCastException) { 691catch (InvalidCastException) {
system\collections\objectmodel\collection.cs (3)
241catch (InvalidCastException) { 278catch (InvalidCastException) { 308catch (InvalidCastException) {
system\resources\resourceset.cs (3)
227catch (InvalidCastException) { 242catch (InvalidCastException) { 256catch (InvalidCastException) {
system\rttype.cs (1)
4727catch (InvalidCastException)
system\runtime\interopservices\marshal.cs (4)
1967catch (InvalidCastException) 1998catch (InvalidCastException) 2032catch (InvalidCastException) 2069catch (InvalidCastException)
system\runtime\interopservices\windowsruntime\clripropertyvalueimpl.cs (2)
390} catch (InvalidCastException elementCastException) { 439catch (InvalidCastException) {
system\security\permissions\environmentpermission.cs (1)
232catch (InvalidCastException)
system\security\permissions\filedialogpermission.cs (1)
141catch (InvalidCastException) {
system\security\permissions\isolatedstoragefilepermission.cs (1)
91catch (InvalidCastException)
system\security\permissions\principalpermission.cs (1)
256catch (InvalidCastException)
system\security\permissions\reflectionpermission.cs (1)
213catch (InvalidCastException)
system\security\permissions\uipermission.cs (1)
258catch (InvalidCastException)
system\timezoneinfo.cs (1)
2427catch (InvalidCastException ex) {
PresentationCore (23)
Core\CSharp\System\Windows\FreezableCollection.cs (1)
541catch (InvalidCastException e)
Core\CSharp\system\windows\generated\TextDecorationCollection.cs (1)
438catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Animation\Generated\TimelineCollection.cs (1)
446catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (1)
445catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\DoubleCollection.cs (1)
412catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\DrawingCollection.cs (1)
459catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\GeneralTransformCollection.cs (1)
447catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\GeometryCollection.cs (1)
459catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\GradientStopCollection.cs (1)
447catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\Int32Collection.cs (1)
412catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\PathFigureCollection.cs (1)
448catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\PathSegmentCollection.cs (1)
447catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\PointCollection.cs (1)
412catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\TextEffectCollection.cs (1)
447catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\TransformCollection.cs (1)
459catch (InvalidCastException e)
Core\CSharp\System\Windows\Media\Generated\VectorCollection.cs (1)
412catch (InvalidCastException e)
Core\CSharp\System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (1)
443catch (InvalidCastException e)
Core\CSharp\System\Windows\Media3D\Generated\MaterialCollection.cs (1)
455catch (InvalidCastException e)
Core\CSharp\System\Windows\Media3D\Generated\Model3DCollection.cs (1)
455catch (InvalidCastException e)
Core\CSharp\System\Windows\Media3D\Generated\Point3DCollection.cs (1)
408catch (InvalidCastException e)
Core\CSharp\System\Windows\Media3D\Generated\Transform3DCollection.cs (1)
455catch (InvalidCastException e)
Core\CSharp\System\Windows\Media3D\Generated\Vector3DCollection.cs (1)
408catch (InvalidCastException e)
Core\CSharp\System\Windows\Media3D\Visual3DCollection.cs (1)
200catch (InvalidCastException e)
PresentationFramework (16)
src\Framework\MS\Internal\IO\Packaging\PackageFilter.cs (2)
296catch(InvalidCastException) 395catch (InvalidCastException)
src\Framework\System\Windows\Controls\ItemsControl.cs (1)
3494catch (System.InvalidCastException)
src\Framework\System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1580catch (InvalidCastException) { }
src\Framework\System\Windows\Documents\WinRTSpellerInterop.cs (1)
72when (ex is InvalidCastException || ex is COMException )
src\Framework\System\Windows\Shell\WindowChrome.cs (1)
275catch (InvalidCastException)
src\Framework\System\Windows\Standard\ErrorCodes.cs (2)
138catch (InvalidCastException) 396catch (InvalidCastException)
src\Framework\System\Windows\Standard\NativeMethods.cs (1)
2163catch (InvalidCastException)
src\Shared\MS\Internal\WindowsRuntime\ReflectionHelper.cs (7)
57/// <exception cref="InvalidCastException">The result of the method call cannot be successfully cast to <i>TResult</i></exception> 90/// <exception cref="InvalidCastException">The result of the method call cannot be successfully cast to <i>TResult</i></exception> 121/// <exception cref="InvalidCastException">The result of the method call cannot be successfully cast to <i>Result</i></exception> 204/// <exception cref="InvalidCastException">The result of the method call cannot be successfully cast to <i>Result</i></exception> 260/// <exception cref="InvalidCastException">The result of the method call cannot be successfully cast to <i>Result</i></exception> 278/// <exception cref="InvalidCastException">The result of the method call cannot be successfully cast to <i>Result</i></exception> 384/// <exception cref="InvalidCastException">The result of the property access can not be cast to <i>Result</i> type</exception>
System (23)
compmod\microsoft\win32\SystemEvents.cs (1)
1055catch (InvalidCastException) {
compmod\system\collections\generic\sorteddictionary.cs (4)
284catch (InvalidCastException) { 288catch (InvalidCastException) { 308catch (InvalidCastException) { 312catch (InvalidCastException) {
compmod\system\collections\generic\sortedlist.cs (4)
260catch (InvalidCastException) { 264catch (InvalidCastException) { 567catch (InvalidCastException) { 571catch (InvalidCastException) {
compmod\system\componentmodel\BindingList.cs (1)
576catch(InvalidCastException) {
compmod\system\componentmodel\TypeDescriptor.cs (3)
2642catch(InvalidCastException) 2655catch(InvalidCastException) 2668catch(InvalidCastException)
net\System\Net\_ConnectStream.cs (1)
1972catch (InvalidCastException)
security\system\security\permissions\storepermission.cs (3)
66catch (InvalidCastException) { 81catch (InvalidCastException) { 98catch (InvalidCastException) {
security\system\security\permissions\typedescriptorpermission.cs (3)
121catch (InvalidCastException) 139catch (InvalidCastException) 159catch (InvalidCastException)
services\monitoring\system\diagnosticts\PerformanceCounterLib.cs (2)
1005catch (InvalidCastException) { 1264catch (InvalidCastException e) {
sys\system\collections\concurrent\BlockingCollection.cs (1)
1642catch (InvalidCastException)
System.Activities (1)
System\Activities\Debugger\DebugInfo.cs (1)
419catch (InvalidCastException)
System.Activities.Presentation (3)
System.Activities.Presentation\System\Activities\Presentation\ActivityDesigner.cs (1)
297catch (InvalidCastException) { }
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelItemCollection.cs (1)
138catch (InvalidCastException) {
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelItemDictionary.cs (1)
187catch (InvalidCastException) {
System.ComponentModel.DataAnnotations (2)
DataAnnotations\CustomValidationAttribute.cs (1)
300} catch (InvalidCastException) {
DataAnnotations\RangeAttribute.cs (1)
111} catch (InvalidCastException) {
System.Core (4)
Microsoft\Scripting\Actions\DynamicObject.cs (1)
522Expression.New(typeof(InvalidCastException).GetConstructor(new Type[]{typeof(string)}),
Microsoft\Scripting\Utils\ReadOnlyCollectionBuilder.cs (3)
299} catch (InvalidCastException) { 322} catch (InvalidCastException) { 346} catch (InvalidCastException) {
System.Data (30)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\ActivityDesigner.cs (1)
297catch (InvalidCastException) { }
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelItemCollection.cs (1)
138catch (InvalidCastException) {
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelItemDictionary.cs (1)
187catch (InvalidCastException) {
fx\src\data\System\Data\CodeGen\datacache.cs (1)
815Catch(typeof(System.InvalidCastException), "e", Throw(typeof(System.Data.StrongTypingException), "StrongTyping_CananotAccessDBNull", "e"))
fx\src\data\System\Data\Common\AdapterUtil.cs (7)
198static internal InvalidCastException InvalidCast(string error) { 201static internal InvalidCastException InvalidCast(string error, Exception inner) { 202InvalidCastException e = new InvalidCastException(error, inner); 255static internal InvalidCastException InvalidCast() { 256InvalidCastException e = new InvalidCastException(); 946static internal InvalidCastException CollectionInvalidType(Type collection, Type itemType, object invalidValue) { 1607else if (inner is InvalidCastException) {
fx\src\data\System\Data\Common\DbConnectionStringBuilder.cs (1)
291catch(InvalidCastException) {
fx\src\data\System\Data\Common\DbConnectionStringCommon.cs (4)
266catch (InvalidCastException e) 296catch (InvalidCastException e) 308catch (InvalidCastException e) 320catch (InvalidCastException e)
fx\src\data\System\Data\DataColumn.cs (2)
572catch (InvalidCastException ex) { 697catch (InvalidCastException ex) {
fx\src\data\System\Data\Filter\BinaryNode.cs (1)
224catch (System.InvalidCastException e) {
fx\src\data\System\Data\Filter\ConstNode.cs (5)
131catch (System.InvalidCastException e) { 146catch (System.InvalidCastException e) { 190catch (System.InvalidCastException e) { 206catch (System.InvalidCastException e) { 222catch (System.InvalidCastException e) {
fx\src\data\System\Data\OleDb\OLEDB_Util.cs (2)
222static internal InvalidCastException ConversionRequired() { 225static internal InvalidCastException CantConvertValue() {
fx\src\data\System\Data\OleDb\oledbconnectionstring.cs (1)
377catch(InvalidCastException e) {
fx\src\data\System\Data\OleDb\OleDbDataReader.cs (1)
1552catch(System.InvalidCastException e) { // MDAC 64320
fx\src\data\System\Data\OleDb\OleDbEnumerator.cs (1)
51catch(InvalidCastException) {
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (1)
2659catch (InvalidCastException) {
System.Data.DataSetExtensions (1)
System\Data\DataSetUtil.cs (1)
59internal static InvalidCastException InvalidCast(string message)
System.Data.Entity (3)
System\Data\Common\Internal\Materialization\Translator.cs (1)
825catch (InvalidCastException)
System\Data\EntityClient\EntityProviderServices.cs (1)
72/// <exception cref="InvalidCastException">prototype argument must be a EntityCommand</exception>
System\Data\Metadata\MetadataWorkspace.cs (1)
250catch (InvalidCastException)
System.Data.Entity.Design (25)
System\Data\Entity\Design\SSDLGenerator\RelationshipDetailsRow.cs (12)
55catch (System.InvalidCastException e) 77catch (System.InvalidCastException e) 99catch (System.InvalidCastException e) 121catch (System.InvalidCastException e) 143catch (System.InvalidCastException e) 165catch (System.InvalidCastException e) 187catch (System.InvalidCastException e) 209catch (System.InvalidCastException e) 231catch (System.InvalidCastException e) 253catch (System.InvalidCastException e) 275catch (System.InvalidCastException e) 296catch (System.InvalidCastException e)
System\Data\Entity\Design\SSDLGenerator\TableDetailsRow.cs (13)
55catch (System.InvalidCastException e) 77catch (System.InvalidCastException e) 99catch (System.InvalidCastException e) 121catch (System.InvalidCastException e) 143catch (System.InvalidCastException e) 165catch (System.InvalidCastException e) 187catch (System.InvalidCastException e) 209catch (System.InvalidCastException e) 232catch (System.InvalidCastException e) 254catch (System.InvalidCastException e) 276catch (System.InvalidCastException e) 298catch (System.InvalidCastException e) 320catch (System.InvalidCastException e)
System.Data.Linq (1)
DbConvert.cs (1)
188} catch (InvalidCastException) {
System.IdentityModel (4)
System\IdentityModel\Tokens\RsaSecurityKey.cs (2)
131catch (InvalidCastException e) 175catch (InvalidCastException e)
System\IdentityModel\Tokens\X509AsymmetricSecurityKey.cs (2)
308catch (InvalidCastException e) 375catch (InvalidCastException e)
System.Management (4)
WmiGenerator.cs (4)
1716catch(System.InvalidCastException ) 1748catch(System.InvalidCastException ) 1778catch(System.InvalidCastException ) 1810catch(System.InvalidCastException )
System.Security (3)
system\security\permissions\dataprotectionpermission.cs (3)
67catch (InvalidCastException) { 82catch (InvalidCastException) { 99catch (InvalidCastException) {
System.ServiceModel (1)
System\ServiceModel\Description\WsdlImporter.cs (1)
636catch (InvalidCastException)
System.Transactions (3)
System\Transactions\DistributedTransactionPermission.cs (3)
66catch (InvalidCastException) 89catch (InvalidCastException) 123catch (InvalidCastException)
System.Web (1)
UI\Control.cs (1)
2050catch (InvalidCastException) {
System.Windows.Forms (7)
winforms\Managed\System\WinForms\Application.cs (1)
219catch (InvalidCastException) {
winforms\Managed\System\WinForms\AxHost.cs (1)
4672catch (InvalidCastException e) {
winforms\Managed\System\WinForms\Formatter.cs (1)
358catch (InvalidCastException ex) {
winforms\Managed\System\WinForms\ListBindingConverter.cs (1)
98catch (InvalidCastException invalidCast)
winforms\Managed\System\WinForms\NativeWindow.cs (1)
512catch (InvalidCastException) {
winforms\Managed\System\WinForms\SelectionRangeConverter.cs (1)
151catch (InvalidCastException invalidCast)
winforms\Managed\System\WinForms\WebBrowser.cs (1)
264catch (InvalidCastException) {
System.Workflow.Activities (2)
Rules\Executor.cs (1)
942catch (InvalidCastException)
Rules\Literal.cs (1)
147catch (InvalidCastException e)
System.Workflow.ComponentModel (1)
AuthoringOM\Serializer\XamlInterfaces.cs (1)
305catch (System.InvalidCastException)
System.Xml (39)
System\Xml\BinaryXml\XmlBinaryReader.cs (9)
994catch (InvalidCastException e) { 1076catch (InvalidCastException e) { 1162catch (InvalidCastException e) { 1248catch (InvalidCastException e) { 1334catch (InvalidCastException e) { 1420catch (InvalidCastException e) { 1506catch (InvalidCastException e) { 1538catch (InvalidCastException e) { 1574catch (InvalidCastException e) {
System\Xml\Core\XmlReader.cs (1)
352catch (InvalidCastException e) {
System\Xml\Core\XmlReaderAsync.cs (1)
72catch (InvalidCastException e) {
System\Xml\Core\XsdValidatingReader.cs (18)
396catch (InvalidCastException e) { 421catch (InvalidCastException e) { 446catch (InvalidCastException e) { 471catch (InvalidCastException e) { 496catch (InvalidCastException e) { 521catch (InvalidCastException e) { 546catch (InvalidCastException e) { 571catch (InvalidCastException e) { 607catch (InvalidCastException e) { 644catch (InvalidCastException e) { 671catch (InvalidCastException e) { 698catch (InvalidCastException e) { 725catch (InvalidCastException e) { 752catch (InvalidCastException e) { 779catch (InvalidCastException e) { 806catch (InvalidCastException e) { 830catch (InvalidCastException e) { 866catch (InvalidCastException e) {
System\Xml\Core\XsdValidatingReaderAsync.cs (4)
50catch (InvalidCastException e) { 89catch (InvalidCastException e) { 127catch (InvalidCastException e) { 167catch (InvalidCastException e) {
System\Xml\Schema\DataTypeImplementation.cs (3)
538catch (InvalidCastException e) { //Catching for exceptions thrown by ValueConverter 977catch (InvalidCastException e) { //Catching for exceptions thrown by ValueConverter 1183catch (InvalidCastException e) { //Catching for exceptions thrown by ValueConverter
System\Xml\Serialization\XmlSerializationReader.cs (2)
1488catch (InvalidCastException) { 4688WriteCatchException(typeof(InvalidCastException));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
3534WriteCatchException(typeof(InvalidCastException));
UIAutomationClientsideProviders (2)
MS\Internal\AutomationProxies\Accessible.cs (2)
191catch (InvalidCastException) 1442else if (e is InvalidCastException)
WindowsBase (2)
Base\MS\Internal\Interop\ErrorCodes.cs (2)
118catch (InvalidCastException) 345catch (InvalidCastException)