NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
MimiKLM

Implicit and fast container array elements access.

Status: New
Let consider I have an array of containers. The container is defined as a user type, (array of the same elements) and consist, let say, from three string variables A, B and C. And, let say the array size is for, example 4.
 
Now, let say, the developer needs to access the array of elements A. Let say he/she has to create an array od strings called StrArr So what he has to do is for example like below:
 
FileGlobals.StrArr={FileGlobals.MyContainerArray[0].A, FileGlobals.MyContainerArray[1].A,FileGlobals.MyContainerArray[2].A, FileGlobals.MyContainerArray[3].A}

 

It is a lot of writing isn't it?
 
Wouldn't be worth considering to implement implicit conversion which allow just to write
 
FileGlobals.StrArr=FileGlobals.MyContainerArray.A

 

or
 
FileGlobals.StrArr=FileGlobals.MyContainerArray[].A