Android Question Force to Pass by Value

Discussion in 'Android Questions' started by DawningTruth, Apr 11, 2019.

  1. DawningTruth

    DawningTruth Active Member Licensed User

    I have a scenario where I have to pass a list to a temp variable and then re-initialize the list. When I re-initialize the list I lose the value in my temp variable. The reason being that it passed the reference to the temp variable and not the values. Here is a sample code, any suggestions on how to pass the values contained in the list rather than the reference?

    Dim tempList As List
    tempList = MyList

  2. Erel

    Erel Administrator Staff Member Licensed User

    Dim tempList As List = MyList
    Dim MyList As List
    BillMeyer and DawningTruth like this.
  3. DawningTruth

    DawningTruth Active Member Licensed User

    Thx :)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice