Submitted by Junfanbl on Wed, 09/07/2016 - 11:14
Forums:
I am only curious, but generally speaking has anybody any knowledge on performance differences when using the with structure compared to accessing an objects properties directly?
I would think that the compiler would treat both segments of code equally? I typically use the with structure to access an objects properties because it is visually more appealing.
re: "with" performance
I've not tested it, but my gut feeling is there would be no difference since it is probably ignored by the compiler anyway.
A quick websearch turned up this link which seems to indicate that it might actually give a slight advantage in certain situations.
http://stackoverflow.com/questions/2053626/vb-net-with-statement-perform...