Sdílet prostřednictvím


List Class

Definition

Contains any number of elements that are accessed sequentially. Lists are structures that can contain values of any X++ type. All the values in the list must be of the same type.

public ref class List : Microsoft::Dynamics::Ax::Xpp::XppObjectBase
public class List : Microsoft.Dynamics.Ax.Xpp.XppObjectBase
type List = class
    inherit XppObjectBase
Public Class List
Inherits XppObjectBase
Inheritance
Microsoft.Dynamics.AX.KernelInterop.ProxyBase
List

Remarks

The type of the values in the list is specified when the list is created and cannot be changed afterwards. The implementation of lists makes traversal of the list elements very fast. Lists can be traversed by using the ListEnumerator class. To create a ListEnumerator object, use List.getEnumerator.

The following example creates a list of integers and prints out a description of the list and the values that it contains.

{ 
    // Create a list of integers 
    List il = new List(Types::Integer); 
    // Add some elements to the list 
    il.addEnd(1); 
    il.addEnd(2); 
    il.addStart(3); 
    // Print a description of the list 
    print il.definitionString(); 
    print il.toString(); 
    pause; 
}

Constructors

List()
List(Types)

Fields

kernelClass (Inherited from XppObjectBase)

Properties

AxClassId
GlobalType

Methods

__shouldCallNew(Type) (Inherited from XppObjectBase)
addEnd(Object)

Adds a value to the end of the list.

addStart(Object)

Adds a value to the start of the list.

addXppProxyReference(Type, Object) (Inherited from XppObjectBase)
appendList(List)
Call(String, Object[], Type[], Object[]) (Inherited from XppObjectBase)
cancelTimeOut(Int32) (Inherited from XppObjectBase)
create(Object[])

Creates a list from the container obtained from a prior call to the List.pack method.

createFromXML(XppObjectBase)
createKernelClass(Object[], Type[], Object[]) (Inherited from XppObjectBase)
definitionString()

Returns a description of the type of the elements in the list.

DotNetCollectionToXppCollection<TKey>(List<TKey>, Types)
elements()

Specifies the number of elements in a list.

empty()

Determines whether a list is empty.

equal(List, List)

Determines whether two lists are identical.

equal(XppObjectBase) (Inherited from XppObjectBase)
equalTo(List)

Determines whether a list is the same as the current list.

finalize() (Inherited from XppObjectBase)
getEnumerator()

Creates an enumerator for a list which allows you to traverse the list.

GetIntPtr()
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getTimeOutTimerHandle() (Inherited from XppObjectBase)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
IsManagedValid()
kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
merge(List, List)

Combines two lists to create a new list.

newmethod() (Inherited from XppObjectBase)
newmethod(Types)

Creates a list.

notify() (Inherited from XppObjectBase)
notifyAll() (Inherited from XppObjectBase)
objectOnServer()
Obsolete.
(Inherited from XppObjectBase)
pack()

Serializes the current instance of the List class.

setTimeOut(String, Int32, Boolean)
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32)
Obsolete.
(Inherited from XppObjectBase)
ToString()

Returns a description of the values in the list.

typeId()

Returns the type of the values in a list.

usageCount() (Inherited from XppObjectBase)
VerifyKernelClass() (Inherited from XppObjectBase)
wait() (Inherited from XppObjectBase)
Xml()

Returns an XML string that represents the current object.

Xml(Int32)
XppCollectionToDotNetCollection<TKey>(List)

Applies to