I tried to find this on the Internet, but my GoogleFu did not help me ...
While DataReader.Read
Dim Foo as New FooBar
Foo.Property = "Test"
Loop
In VB.net, does this create a new Foo instance for each loop? Or just one instance of Foo with a block level scope? Do all blocks (If..EndIf, For..Next) work the same in this regard? I know that Foo is not available outside the block, just not sure if it creates multiple instances of Foo.
source
share