DicomObjects Reference
DicomObjects Reference / DicomGlobal Object / DotNetMode Property
In This Topic
    DotNetMode Property
    In This Topic
    Description
    If true, improves compatibility with the .NET environment
    Property type
    Read-write property
    Syntax
    Visual Basic
    Public Property DotNetMode As Boolean
    Remarks

    In general, arrays in a COM environment are expected to be 1-based, so an array with N elements has an index range from 1 to N.  However, in a .NET environment, the expectation is that the range would be 0 to N-1, and if this is not done, then COM arrays cannot easily be cast to their .NET equivalents.  Therefore, this property, if set true, changes the behaviour, and causes all arrays generated by DicomObjects (e.g. using the Value property of a DicomAttribute to return zero-based arrays, which can simply be cast to their corresponding .NET types (string[] int[] etc.) Similarly, when true, the zero index items in arrays passed to DicomObjects (e.g. in DicomAttributes.Add) are used, when they would otherwise be ignored.

    Note that the indexing of DicomObjects collections (e.g. DicomImagesDicomDataSets) is not affected by this setting.

    See Also