VB.net - Passing variants by reference when Byref doesn't work in this case - Urgent.
Posted on 2006-11-27
I want to access variants "by reference", because I want to be able to access and modify those variants. But I haven't found a way to do it yet in the case I am working on.
I am working with a relatively complex structure of datas. I want to access a particular variant, that is into a sub-structure somewhere, and once I have the right variant, I want to be able to modify it, without having to re-access it every time, since the algorythm to find the variant I want is relatively complex.
My problem : Sorting
-I would like to be able to do something like that :
-In VB.Net 2003
dim Data1 as V_Data1
Public Structure V_Data1
Public Datas2() as V_Data2
Public NbDatas2 as long
Public function Data2(Index,Sort as boolean) as object
'In fact, this funciton is a lot more complex, because it gets the object needed after sorting all the Datas2()
'array in different ways
Public Structure V_Data2
Public Name as string
Public Sub ChangeName