CompiledQuery::Compile<TArg0, TArg1, TResult> Method (Expression<Func<TArg0, TArg1, TResult>^>^)

 

Compiles the query.

Namespace:   System.Data.Linq
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

public:
generic<typename TArg0, typename TArg1, typename TResult>
where TArg0 : DataContext
static Func<TArg0, TArg1, TResult>^ Compile(
	Expression<Func<TArg0, TArg1, TResult>^>^ query
)

Parameters

query
Type: System.Linq.Expressions::Expression<Func<TArg0, TArg1, TResult>^>^

The query expression to be compiled.

Return Value

Type: System::Func<TArg0, TArg1, TResult>^

A generic delegate that represents the compiled query.

Type Parameters

TArg0

Represents the type of the parameter that has to be passed in when executing the delegate returned by the Compile<TArg0, TResult> method.

TArg1

Represents the type of the parameter that has to be passed in when executing the delegate returned by the Compile<TArg0, TResult> method.

TResult

The type of T in the System.Collections.Generic::IEnumerable<T> returned when executing the delegate returned by the Compile<TArg0, TResult> method.

.NET Framework
Available since 3.5
Windows Phone Silverlight
Available since 7.1
Return to top
Show: