We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b54403 commit 4a0f22aCopy full SHA for 4a0f22a
source/upgrade/v3.txt
@@ -227,7 +227,11 @@ Version 3.0 Breaking Changes
227
page to learn how to do so.
228
229
Alternatively, you can check each item's type in a different way. For example, you
230
- can call the item's ``GetType()`` method and compare the result to the type you're
231
- looking for, as shown here: ``item.GetType() == typeof(T)``
+ can call the ``Where()`` method and pass an expression that compares the item's type
+ to the type you're looking for, as in the following example:
232
+
233
+ .. code-block:: csharp
234
235
+ collection.AsQueryable().Where(item => item.GetType() == typeof(T));
236
237
To learn more about type discriminators, see :ref:`<csharp-polymorphism>`.
0 commit comments