Linked Lists

IVIr

Member
Joined
Apr 13, 2006
Messages
7
Programming Experience
5-10
I'm trying to program my own psuedo Linked List. And I'm having a stupid problem. I learned Linked Lists in school in Java and now that I'm trying to program it in VB.Net I can't get something to translate over. I'm using a loop in my program that goes through all the elements. And in Java when I got to the last element it's (link).Next would be null. I can't get it to test for null though. Anybody out there who can save me?
 
In vb:
VB.NET:
Dim x as Object
x = Nothing
 
If x [B]Is[/B] Nothing Then
  'x is null
EndIf
 
If x [B]IsNot[/B] Nothing [B]AndAlso[/B] x.SomeFunction() Then
  'x is valid and the function returned true
EndIf

AndAlso is like java's && - short circuited evaluation
 
Back
Top