ToListOrEmpty<T> extension

Wraps a nullable value into a list, treating null as empty.

on
  • T?

Methods

toListOrEmpty() List<T>

Available on T?, provided by the ToListOrEmpty extension

Wraps a non-null value in a single-element list, or returns an empty list when null.