QueryableExThrowTResult Method (IQueryProvider, Exception) |
Returns a sequence that throws an exception upon enumeration.
Namespace: System.LinqAssembly: System.Interactive.Providers (in System.Interactive.Providers.dll) Version: 1.2.0.0
Syntaxpublic static IQueryable<TResult> Throw<TResult>(
this IQueryProvider provider,
Exception exception
)
Parameters
- provider
- Type: System.LinqIQueryProvider
Query provider. - exception
- Type: SystemException
Exception to throw upon enumerating the resulting sequence.
Type Parameters
- TResult
- Result sequence element type.
Return Value
Type:
IQueryableTResultSequence that throws the specified exception upon enumeration.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IQueryProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also