It will be executed only once and the next time the function is called, it will refer to the same object as you mentioned. By the way, your first fragment is not thread safe. If two threads call your function at the same time, they may end up running the constructor twice, which you don't want. Using the second fragment frees you from manually blocking and ensuring thread safety, since the compiler creates the appropriate code for you.
Please note that if you declared it as
Static x As List(Of String) x = New List(Of String)
It was recreated every time.
source share