Compartir a través de


Set Class

Definition

The Set class is used for the storage and retrieval of data from a collection in which the values of the elements contained are unique and serve as the key values according to which the data is automatically ordered.

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

Remarks

The values may be of any X++ type. All values in the set must have the same type. When a value that is already stored in the set is added, it is ignored and does not increase the number of elements in the set. The values stored in the set can be traversed by using objects of type SetEnumerator. The contents of a set are stored in a way that facilitates efficient look up of the elements.

The following example checks whether any of the values in one set, the noConfigs set, are found in a second set, the yesConfigs set. If they are, they are removed from the yesConfigs set.

Set             noConfigs; 
Set             yesConfigs; 
ConfigId        configId; 
SetEnumerator   se; 
; 
se = noConfigs.getEnumerator(); 
while (se.moveNext()) 
{ 
    configId    = se.current(); 
    if (yesConfigs.in(configId)) 
    { 
        yesConfigs.remove(configId); 
    } 
}

Constructors

Set()
Set(Types)

Fields

kernelClass (Inherited from XppObjectBase)

Properties

AxClassId
GlobalType
Version

Methods

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

Adds an element to the set.

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

Creates a set from the container obtained from a prior call to the Set.pack method.

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

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

difference(Set, Set)

Calculates and retrieves the set containing the elements from set1 that are not found in set2.

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

Returns the number of elements in the set.

empty()

Determines whether the set is empty.

equal(Set)

Determines whether a set is identical to the current set.

equal(XppObjectBase) (Inherited from XppObjectBase)
finalize() (Inherited from XppObjectBase)
getEnumerator()

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

GetIntPtr()
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getTimeOutTimerHandle() (Inherited from XppObjectBase)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
In(Object)

Determines whether a specified element is a member of the set.

intersection(Set, Set)

Calculates and returns the identical values found in two sets.

IsManagedValid()
kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
newmethod() (Inherited from XppObjectBase)
newmethod(Types)

Creates a set that can contain elements of the specified type.

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

Serializes the current instance of the Set class.

remove(Object)

Removes an element from the set.

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

Returns a string describing the contents of the set.

typeId()

Returns the type of the values in the set.

union(Set, Set)

Calculates and retrieves the union of two given sets. This is the set that contains the values found in at least one of the sets.

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>(Set)

Applies to