I have an array DetailsArray in VB.NET which contains the result of a LINQ query. I have shown below the values of the array. i need to get the “ProjectID” from the array and assign it to ‘ProjID’ variable
DetailsArray (0){Name =
“TestProject1”, ProjectID = 10}
Dim ProjID as Integer = DetailsArray(??)
How would I do that?
Thanks in advance.
You are showing the values of the first element of the array (
DetailsArray(0)), not of the whole array (DetailsArray).To get to the value of the
ProjectIDproperty in the first element of the array: