Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
TypeIs Method
Collapse the table of content
Expand the table of content

Expression::TypeIs Method

Namespace:  System.Linq.Expressions
Assemblies:   System.Core (in System.Core.dll)
  System.Linq.Expressions (in System.Linq.Expressions.dll)

public:
static TypeBinaryExpression^ TypeIs(
	Expression^ expression, 
	Type^ type
)

Parameters

expression
Type: System.Linq.Expressions::Expression

An Expression to set the Expression property equal to.

type
Type: System::Type

A Type to set the TypeOperand property equal to.

Return Value

Type: System.Linq.Expressions::TypeBinaryExpression
A TypeBinaryExpression for which the NodeType property is equal to TypeIs and for which the Expression and TypeOperand properties are set to the specified values.

ExceptionCondition
ArgumentNullException

expression or type is nullptr.

The Type property of the resulting UnaryExpression represents Boolean.

The following example demonstrates how to use the TypeIs(Expression, Type) method to create a TypeBinaryExpression that represents a type test of a string value against the Int32 type.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
Show:
© 2015 Microsoft