[This is preliminary documentation and is subject to change.]

Gets last item in collection

Namespace: Tools.CollectionsT
Assembly: Tools (in Tools.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
public static Object Last(
	this IList Collection
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function Last ( _
	Collection As IList _
) As Object
Visual C++
[ExtensionAttribute]
public:
static Object^ Last(
	IList^ Collection
)
F#
static member Last : 
        Collection:IList -> Object 
JScript
public static function Last(
	Collection : IList
) : Object

Parameters

Collection
Type: System.Collections..::..IList
Collection to obtain item from

Return Value

Last item in Collection (item at highest index), or null if Collection is empty

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionCollection is null

See Also