Empty Method
TOC
Collapse the table of content
Expand the table of content

Expression.Empty Method ()

 

Creates an empty expression that has Void type.

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

static member Empty : unit -> DefaultExpression

Return Value

Type: System.Linq.Expressions.DefaultExpression

A DefaultExpression that has the NodeType property equal to Default and the Type property set to Void.

An empty expression can be used where an expression is expected but no action is desired. For example, you can use an empty expression as the last expression in a block expression. In this case, the block expression's return value is void.

The following code example shows how to create an empty expression and add it to a block expression.

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

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft