Returns a collection of tokens that contains the descendants of every token in the source collection.
| C# | Visual Basic | Visual C++ |
public static IJEnumerable<JToken> Descendants<T>( this IEnumerable<T> source ) where T : JContainer
<ExtensionAttribute> _ Public Shared Function Descendants(Of T As JContainer) ( _ source As IEnumerable(Of T) _ ) As IJEnumerable(Of JToken)
[ExtensionAttribute] public: generic<typename T> where T : JContainer static IJEnumerable<JToken^>^ Descendants( IEnumerable<T>^ source )
- T
- The type of the objects in source, constrained to JContainer.
- source (IEnumerable<(Of <(<'T>)>)>)
- An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the descendants of every node in the source collection.
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<(Of <(<'T>)>)>. When you use instance method syntax to call this method, omit the first parameter.