Language

Extensions.ToEnumerable Method

Definition

Overloads

Name Description
ToEnumerable(IIterable)

Returns an IEnumerable that iterates over a Java IIterable, allowing foreach and LINQ to be used with Java collection types. Each element is marshaled from its Java instance to the corresponding managed type.

ToEnumerable<T>(IIterable)

Returns an IEnumerable<T> that iterates over a Java IIterable, marshaling each element to T. This allows foreach and LINQ to be used with Java collection types.

ToEnumerable(IIterable)

Returns an IEnumerable that iterates over a Java IIterable, allowing foreach and LINQ to be used with Java collection types. Each element is marshaled from its Java instance to the corresponding managed type.

public static System.Collections.IEnumerable ToEnumerable(this Java.Lang.IIterable source);
static member ToEnumerable : Java.Lang.IIterable -> System.Collections.IEnumerable

Parameters

source
IIterable

The Java IIterable to enumerate.

Returns

An IEnumerable over the elements of source.

Exceptions

source is null.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToEnumerable<T>(IIterable)

Returns an IEnumerable<T> that iterates over a Java IIterable, marshaling each element to T. This allows foreach and LINQ to be used with Java collection types.

public static System.Collections.Generic.IEnumerable<T?> ToEnumerable<T>(this Java.Lang.IIterable source);
static member ToEnumerable : Java.Lang.IIterable -> seq<'T>

Type Parameters

T

The managed type to marshal each Java element to.

Parameters

source
IIterable

The Java IIterable to enumerate.

Returns

An IEnumerable<T> over the elements of source.

Exceptions

source is null.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to