69 references to InvalidCastException
mscorlib (63)
system\boolean.cs (2)
242
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Boolean", "Char"));
302
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Boolean", "DateTime"));
system\byte.cs (1)
255
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Byte", "DateTime"));
system\char.cs (5)
435
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Char", "Boolean"));
485
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Char", "Single"));
490
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Char", "Double"));
495
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Char", "Decimal"));
500
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Char", "DateTime"));
system\convert.cs (8)
213
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_IConvertible"));
253
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_DBNull"));
255
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_Empty"));
313
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_DBNull"));
315
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_Empty"));
318
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", value.GetType().FullName, targetType.FullName));
333
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_CannotCastNullToValueType"));
343
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_IConvertible"));
system\datetime.cs (13)
1580
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Boolean"));
1585
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Char"));
1590
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "SByte"));
1595
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Byte"));
1600
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Int16"));
1605
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "UInt16"));
1610
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Int32"));
1615
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "UInt32"));
1620
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Int64"));
1625
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "UInt64"));
1630
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Single"));
1635
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Double"));
1640
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "DateTime", "Decimal"));
system\dbnull.cs (14)
49
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
54
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
59
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
64
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
69
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
74
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
79
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
84
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
89
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
94
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
99
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
104
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
109
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
114
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromDBNull"));
system\decimal.cs (2)
1208
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Decimal", "Char"));
1268
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Decimal", "DateTime"));
system\double.cs (2)
309
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Double", "Char"));
369
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Double", "DateTime"));
system\enum.cs (1)
1032
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Enum", "DateTime"));
system\int16.cs (1)
268
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Int16", "DateTime"));
system\int32.cs (1)
241
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Int32", "DateTime"));
system\int64.cs (1)
220
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Int64", "DateTime"));
system\runtime\remoting\realproxy.cs (2)
552
throw new
InvalidCastException
(
562
throw new
InvalidCastException
(
system\runtime\remoting\remotingservices.cs (1)
1459
throw new
InvalidCastException
(
system\sbyte.cs (1)
276
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "SByte", "DateTime"));
system\single.cs (2)
279
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Single", "Char"));
339
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "Single", "DateTime"));
system\uint16.cs (1)
243
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "UInt16", "DateTime"));
system\uint32.cs (1)
225
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "UInt32", "DateTime"));
system\uint64.cs (1)
220
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_FromTo", "UInt64", "DateTime"));
system\variant.cs (3)
575
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_CannotCoerceByRefVariant"));
580
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_CannotCoerceByRefVariant"));
684
throw new
InvalidCastException
(Environment.GetResourceString("InvalidCast_CannotCoerceByRefVariant"));
System.Activities.Presentation (2)
System.Activities.Presentation\System\Activities\Presentation\Xaml\ActivityBuilderHelper.cs (2)
33
throw FxTrace.Exception.AsError(new
InvalidCastException
(astAsModelItem.ItemType.FullName));
39
throw FxTrace.Exception.AsError(new
InvalidCastException
(input.GetType().FullName));
System.Data (2)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Xaml\ActivityBuilderHelper.cs (2)
33
throw FxTrace.Exception.AsError(new
InvalidCastException
(astAsModelItem.ItemType.FullName));
39
throw FxTrace.Exception.AsError(new
InvalidCastException
(input.GetType().FullName));
System.Data.DataSetExtensions (1)
System\Data\DataSetUtil.cs (1)
61
return TraceExceptionAsReturnValue(new
InvalidCastException
(message));
System.Workflow.Activities (1)
Rules\Executor.cs (1)
804
throw new
InvalidCastException
(message);