&<img src="../resources/images/opentocr.png" title="Open Contents list" border="0"&>
You are here:
.NET Collections
.NET Collections can accessed using the following methods:
Visual LANSA For statement
Define Field(#LNum6501) Type(*INT)
Define Field(#LStr6501) Type(*STRING) Length(20)
Define Field(#LBol6501) Type(*BOOLEAN)
 
Define_Com Class(#DNE003_SystemDll.System.Collections.Specialized.StringCollection) Name(#LCls6501_Coll) Reference(*DYNAMIC)
 
#LCls6501_Coll <= *New #DNE003_SystemDll.System.Collections.Specialized.StringCollection
 
#LStr6501 := 'Test'
#LCls6501_Coll.Add( 'Test1' )
#LCls6501_Coll.Add( 'Test2' )
#LCls6501_Coll.Add( 'Test3' )
 
#LNum6501 := 0
#LBol6501 := true
For Each(#Current) In(#LCls6501_Coll)
#LNum6501 += 1
If (#Current <> (#LStr6501 + #LNum6501.AsString))
#LBol6501 := false
Endif
Endfor
 
.NET indexer (commonly represented by the Item property)
Define Field(#LNum6601) Type(*INT)
Define Field(#LStr6601) Type(*STRING) Length(20)
Define Field(#LBol6601) Type(*BOOLEAN)
 
Define_Com Class(#DNE003_SystemDll.System.Collections.Specialized.StringCollection) Name(#LCls6601_Coll) Reference(*DYNAMIC)
 
#LCls6601_Coll <= *New #DNE003_SystemDll.System.Collections.Specialized.StringCollection
 
#LStr6601 := 'Test'
#LCls6601_Coll.Add( 'Test0' )
#LCls6601_Coll.Add( 'Test1' )
#LCls6601_Coll.Add( 'Test2' )