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

◆ TypeAs()

static UnaryExpression System.Linq.Expressions.Expression< TDelegate >.TypeAs ( Expression< TDelegate > expression,
Type type )
inlinestaticinherited

Definition at line 5252 of file Expression.cs.

5253 {
5256 TypeUtils.ValidateType(type, "type");
5257 if (type.IsValueType && !type.IsNullableType())
5258 {
5259 throw Error.IncorrectTypeForTypeAs(type, "type");
5260 }
5261 return new UnaryExpression(ExpressionType.TypeAs, expression, type, null);
5262 }
static void RequiresNotNull(object value, string paramName)
static void RequiresCanRead(Expression expression, string paramName)
static void ValidateType(Type type, string paramName)
Definition TypeUtils.cs:695

References System.Linq.Expressions.Error.IncorrectTypeForTypeAs(), System.Dynamic.Utils.ExpressionUtils.RequiresCanRead(), System.Dynamic.Utils.ContractUtils.RequiresNotNull(), System.type, and System.Dynamic.Utils.TypeUtils.ValidateType().