Question : Expression is a value and therefore cannot be the target of an assignment  vb.net

Public Structure _cache
    Public loading As Boolean
End Structure


Public Class Server
    Public _cache_List As New List(Of _cache)()
...

For index As Int16 = 0 To _cache_List.Count - 1
_cache_List(index).loading = false '--> error
Next

"Expression is a value and therefore cannot be the target of an assignment "

what was wrong in the code above?

Answer : Expression is a value and therefore cannot be the target of an assignment  vb.net

Structures are fundamentally different from classes in that they are value-types rather than reference types. Whether or not you need a struct rather than a class depends largely on its intended use.
Random Solutions  
 
programming4us programming4us