rocky050371
asked on
Correct Code Execution Path
I am curious that if you have a function that uses a using keyword, should the return element come the end using or does it not matter
ie this is what I have
Using log As New EventLog(EVENTLOGNAME)
Dim errors(log.Entries.Count - 1) As structLoggedError
For Each entry In log.Entries
Using reader As New StringReader(entry.Message )
errors(i) = CType(serializer.Deseriali ze(reader) , structLoggedError)
i += 1
End Using
Next
Return errors <<<<<<<<<<<
End Using
ie this is what I have
Using log As New EventLog(EVENTLOGNAME)
Dim errors(log.Entries.Count - 1) As structLoggedError
For Each entry In log.Entries
Using reader As New StringReader(entry.Message
errors(i) = CType(serializer.Deseriali
i += 1
End Using
Next
Return errors <<<<<<<<<<<
End Using
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.