Link to home
Start Free TrialLog in
Avatar of rocky050371
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.Deserialize(reader), structLoggedError)
                        i += 1
                    End Using
                Next

                Return errors <<<<<<<<<<<

            End Using
ASKER CERTIFIED SOLUTION
Avatar of Edgard Yamashita
Edgard Yamashita
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial