[This is preliminary documentation and is subject to change.]
Prefixes a sequence with a single item.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static IEnumerable<T> Prefix<T>( this IEnumerable<T> source, T item )
<ExtensionAttribute> _ Public Shared Function Prefix(Of T) ( _ source As IEnumerable(Of T), _ item As T _ ) As IEnumerable(Of T)
[ExtensionAttribute] public: generic<typename T> static IEnumerable<T>^ Prefix( IEnumerable<T>^ source, T item )
Generic Template Parameters
- T
- The type of the elements of the input sequence.
Parameters
- source (IEnumerable<(Of <(<'T>)>)>)
- The sequence to prefix.
- item (T)
- The element being prefixed to the source sequence.
Return Value