Skale
asked on
Checking System.Array's item's naming in vb.net
Hi, I'm using below COM-interface function to get a list of used parameters in 3rd part program. Function output type is System.Array and item's like below;
$X_FR_TABUl_F_x
$X_FR_TABUl_F_y
$X_FR_TABUl_F_z
$X_FR_FABUl_M_x
$X_FR_FABUl_M_y
$X_FR_FABUl_M_z
$X_FR_FADAl_F_x
$X_FR_FADAl_F_y
$X_FR_FADAl_F_z
$X_FR_FADAl_M_x
$X_FR_FADAl_M_a
$X_FR_FADAl_M_z
As in example F_x, F_y, F_z, M_x, M_y, M_z is related to each other so i'd like to check (e.g.) item starting with "$X_FR_TABUl" has F_x, F_y, F_z, M_x, M_y, M_z items. If all of them is existing it will return True else it will return False for each item.
$X_FR_TABUl -- TRUE
$X_FR_FADAl -- FALSE
Because as you can see $X_FR_FADAl_M_y is it missing.
Is there anyway to quick check these naming with best approach (maybe with LINQ) in vb.net ?
Any help would be grateful. Thanks.
model.getParameterList()
Sample Output of model.getParameterList() as System.Array:$X_FR_TABUl_F_x
$X_FR_TABUl_F_y
$X_FR_TABUl_F_z
$X_FR_FABUl_M_x
$X_FR_FABUl_M_y
$X_FR_FABUl_M_z
$X_FR_FADAl_F_x
$X_FR_FADAl_F_y
$X_FR_FADAl_F_z
$X_FR_FADAl_M_x
$X_FR_FADAl_M_a
$X_FR_FADAl_M_z
As in example F_x, F_y, F_z, M_x, M_y, M_z is related to each other so i'd like to check (e.g.) item starting with "$X_FR_TABUl" has F_x, F_y, F_z, M_x, M_y, M_z items. If all of them is existing it will return True else it will return False for each item.
$X_FR_TABUl -- TRUE
$X_FR_FADAl -- FALSE
Because as you can see $X_FR_FADAl_M_y is it missing.
Is there anyway to quick check these naming with best approach (maybe with LINQ) in vb.net ?
Any help would be grateful. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just change the value in the group by function from 3 to 1.
ASKER
Thanks for the information how can i check single value with your code like $X_FR_TABUl_F_x ?
ASKER
Console.WriteLine(r.Key + " " + r.Count.ToString())
r.count.tostring //output will be 6.