Eg:
Set Iterator=##class(classname).%New()
While Iterator.HasNext()
{
Set object=Iterator.Next()
} ]]>
1 1 0 Returns true if the iteration has more elements. 1 %Boolean Returns the next element in the iteration. Only returns a valid element if HasNext() returns true Causes an error if HasNext() returns false 1 %CacheString