Provides access to the members of a DicomContexts collection
Visual Basic |
---|
Public Property Item( _ ByVal ContextID As Integer _ ) As DicomContext |
As it is a presentation context ID, the index must be a small, odd integer (1-255)
As items may be missing or rejected from the sequence, the best way to access all the members of a DicomContexts collection is using the standard iterator (for each in VB). In languages where this is not available then the Exists property must be tested, and the best method is along the lines:
Copy Code | |
---|---|
for i=1 to 255 step 2 if contexts.exists(i) then context = contexts(i) process context item… end if next |
As this is the default property, the term "Item" is rarely used, as
Contexts.Item(3)
may rather more concisely be written as
Contexts(3)