C
Chris
Is there any difference (memory/speed wise) between these two snipits. I
always like to write in snipit 2 style, but was just curious. I'm scared
I'd declare a thousand pointers when I don't need to.
Snip 1:
Dim Obj as object
For ii as integer = 0 to 1000
Obj = GetSomeTypeOfObject()
DoSomeThingWithObject(Obj)
Next
Snip 2:
For ii as integer = 0 to 1000
Dim Obj as object = GetSomeTypeOfObject()
DoSomeThingWithObject(Obj)
Next
Thanks for the insite.
Chris
always like to write in snipit 2 style, but was just curious. I'm scared
I'd declare a thousand pointers when I don't need to.
Snip 1:
Dim Obj as object
For ii as integer = 0 to 1000
Obj = GetSomeTypeOfObject()
DoSomeThingWithObject(Obj)
Next
Snip 2:
For ii as integer = 0 to 1000
Dim Obj as object = GetSomeTypeOfObject()
DoSomeThingWithObject(Obj)
Next
Thanks for the insite.
Chris