| Visual Basic (Declaration) | |
|---|---|
<ExtensionAttribute()> Public Shared Function OfType(Of TResult)( _ ByVal source As ITypedEntityQuery _ ) As IEntityQuery(Of TResult)  | |
| Visual Basic (Usage) |  Copy Code | 
|---|---|
Dim source As ITypedEntityQuery Dim value As IEntityQuery(Of TResult) value = EntityQueryExtensions.OfType(Of TResult)(source)  | |
| C# | |
|---|---|
[ExtensionAttribute()] public static IEntityQuery<TResult> OfType<TResult>( ITypedEntityQuery source )  | |
| C++/CLI | |
|---|---|
[ExtensionAttribute()] public: static IEntityQuery<TResult^>^ OfTypegeneric<typename TResult> ( ITypedEntityQuery^ source )  | |
Parameters
- source
 
Type Parameters
- TResult
 
OfType is used to filter a query for instances of a derived type.
            Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family