spdracer22
Member
- Joined
- Oct 18, 2007
- Messages
- 7
- Programming Experience
- 3-5
Which has a faster execution: assigning values to a structure using a New() constructor, or assigning those values directly?
Example:
Dim temp as myStructure = New myStructure(1,2,3)
or
Dim temp as myStructure
temp.a = 1
temp.b = 2
temp.c = 3
Assume the New() constructor contains the same code as assigning each value directly, only I wouldn't have to use those three 'extra' lines of code every time I wanted to use that structure type.
Example:
Dim temp as myStructure = New myStructure(1,2,3)
or
Dim temp as myStructure
temp.a = 1
temp.b = 2
temp.c = 3
Assume the New() constructor contains the same code as assigning each value directly, only I wouldn't have to use those three 'extra' lines of code every time I wanted to use that structure type.