Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreateInvalidCastException() [2/2]

Exception System.Xml.Serialization.XmlSerializationReader.CreateInvalidCastException ( Type type,
object? value,
string? id )
inlineprotected

Definition at line 1550 of file XmlSerializationReader.cs.

1551 {
1552 if (value == null)
1553 {
1554 return new InvalidCastException(System.SR.Format(System.SR.XmlInvalidNullCast, type.FullName));
1555 }
1556 if (id == null)
1557 {
1558 return new InvalidCastException(System.SR.Format(System.SR.XmlInvalidCast, value.GetType().FullName, type.FullName));
1559 }
1560 return new InvalidCastException(System.SR.Format(System.SR.XmlInvalidCastWithId, value.GetType().FullName, type.FullName, id));
1561 }
static string XmlInvalidCast
Definition SR.cs:1680
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlInvalidCastWithId
Definition SR.cs:1682
static string XmlInvalidNullCast
Definition SR.cs:1686
Definition SR.cs:7

References System.SR.Format(), System.type, System.value, System.SR.XmlInvalidCast, System.SR.XmlInvalidCastWithId, and System.SR.XmlInvalidNullCast.