K
keith
If I declare a variable and set it = nothing then pass it byref into a
routine that accepts an optional argument of the same type with a
default of nothing, is there anyway to determine where the varable was
decalred? I know I could include another argument that specifies
whether i'm passing it in or not, but was looking for a more elegant
solution. If the dimensioning class cannot be determined, can the
dimensioning assembly?
i.e.
Dim sqlTran as SqlTransaction = Nothing
Dim objClass As New MyClass
objClass.SomeRoutine(sqlTran)
'*** Different Class ***
Class MyClass
Public Sub SomeRoutine(Optional ByRef sqlTran as SqlTransaction =
Nothing)
'was sqlTran passed in or is it the optional default?
End Sub
End Class
Thanks for your help,
-Keith
routine that accepts an optional argument of the same type with a
default of nothing, is there anyway to determine where the varable was
decalred? I know I could include another argument that specifies
whether i'm passing it in or not, but was looking for a more elegant
solution. If the dimensioning class cannot be determined, can the
dimensioning assembly?
i.e.
Dim sqlTran as SqlTransaction = Nothing
Dim objClass As New MyClass
objClass.SomeRoutine(sqlTran)
'*** Different Class ***
Class MyClass
Public Sub SomeRoutine(Optional ByRef sqlTran as SqlTransaction =
Nothing)
'was sqlTran passed in or is it the optional default?
End Sub
End Class
Thanks for your help,
-Keith