EnumerableExtensions.YieldIfNotNull<T>(T) Method
Converts an individual item into an IEnumerable<T> sequence that contains this item. If the specified item is null, the method returns an empty sequence.
Namespace: DevExpress.Maui.Mvvm
Assembly: DevExpress.Maui.Mvvm.dll
NuGet Package: DevExpress.Maui.Mvvm
Declaration
public static IEnumerable<T> YieldIfNotNull<T>(
this T singleElement
)
Parameters
| Name | Type | Description |
|---|---|---|
| singleElement | T | The source item. |
Type Parameters
| Name | Description |
|---|---|
| T | The item type. |
Returns
| Type | Description |
|---|---|
| IEnumerable<T> | A sequence that contains the source item. If the item is |
See Also