AsyncEnumerable.Repeat<TResult>(TResult, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
產生包含一個重複值的序列。
public:
generic <typename TResult>
static System::Collections::Generic::IAsyncEnumerable<TResult> ^ Repeat(TResult element, int count);
public static System.Collections.Generic.IAsyncEnumerable<TResult> Repeat<TResult>(TResult element, int count);
static member Repeat : 'Result * int -> System.Collections.Generic.IAsyncEnumerable<'Result>
Public Function Repeat(Of TResult) (element As TResult, count As Integer) As IAsyncEnumerable(Of TResult)
類型參數
- TResult
結果序列中要重複的值類型。
參數
- element
- TResult
價值要重複。
- count
- Int32
在產生的序列中重複該數值的次數。
傳回
IAsyncEnumerable<TResult>
一個 IAsyncEnumerable<T> 包含重複值的 。
例外狀況
count 小於0。