![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Apr 2006
Posts: 2
Rep Power: 0
![]() |
Wierd Behavior when passing Nothing
I won't paste the actual code, but I'll duplicate the circumstances
Class UI
Sub CallingSub()
dim strOne as String = Nothing
dim strTwo as String = Nothing
if txtOne.Text <> "" then
strOne = txtOne.Text
end if
if txtTwo.Text <> "" then
strTwo = txtTwo.Text
end if
dim objBusiness as Business
objBusiness.CallMe(strOne, strTwo)
End Sub
End Class
Class Business
Sub CallMe(ByVal strOne as String, ByVal strTwo as String)
....
End Sub
End ClassstrOne in UI is Nothing when I pass it (this has been verified in debugging). I put a watch on strOne in Business. As soon as Business.CallMe is called, strOne in Business.CallMe is equal to "-32768" as a string. If I pass strTwo as Nothing, it remains Nothing. What is going on here? |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Apr 2006
Posts: 2
Rep Power: 0
![]() |
nm
It was a typo
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|