Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

C#
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 null, the method returns an empty sequence.

See Also