Collections.EmptyList Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an empty list (immutable).
[Android.Runtime.Register("emptyList", "()Ljava/util/List;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static System.Collections.IList EmptyList ();
[<Android.Runtime.Register("emptyList", "()Ljava/util/List;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member EmptyList : unit -> System.Collections.IList
Returns
an empty immutable list
- Attributes
Remarks
Returns an empty list (immutable). This list is serializable.
This example illustrates the type-safe way to obtain an empty list:
List<String> s = Collections.emptyList();
Added in 1.5.
Java documentation for java.util.Collections.emptyList()
.
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.