T
tinman
Hi....
Assume Function A in an application calls Function GetSomeData in another
assembly..... which then is the prefered method to return the SqlDatareader
object back to Function A (and why ?).
Does the prefered option apply to all reference types ?
Option 1
*******
Public Function GetSomeData (ByRef dr as SqlDataReader) as Long
Option 2
*******
Public Function GetSomeData (ByVal dr as SqlDataReader) as Long
Option 3
*******
Public Function GetSomeData () as SqlDataReader
Is it better to pass "objects" ByVal or ByRef (from a performance
perspective) ?
Cheers!
Assume Function A in an application calls Function GetSomeData in another
assembly..... which then is the prefered method to return the SqlDatareader
object back to Function A (and why ?).
Does the prefered option apply to all reference types ?
Option 1
*******
Public Function GetSomeData (ByRef dr as SqlDataReader) as Long
Option 2
*******
Public Function GetSomeData (ByVal dr as SqlDataReader) as Long
Option 3
*******
Public Function GetSomeData () as SqlDataReader
Is it better to pass "objects" ByVal or ByRef (from a performance
perspective) ?
Cheers!