I have a function that takes a string by reference:
Function Foo(ByRef input As String)
If I call it this:
Foo(Nothing)
I want him to do something different than if I would call it this way:
Dim myString As String = Nothing Foo(myString)
Is it possible to detect this difference in the method call method in VB.NET?
Edit
To find out why I would like to do this, I have two methods:
Function Foo() Foo(Nothing) End Function Function Foo(ByRef input As String) 'wicked awesome logic here, hopefully End Function
All logic is in the second overload, but I want to execute a different branch of the logic if Nothing was passed to the function than if a variable containing Nothing were passed.
source share