Kai,
but according to .Net it seems so and it seems to
fulfill what i want to check.
O.K. I see what you are seeing. You are seeing Stream.Null which is a "Null
Object". "Null Object" is a specific application of the Special Case
Pattern.
http://www.martinfowler.com/eaaCatalog/specialCase.html
Null objects are useful in routines where you do not want to be constantly
checking to see if an object reference is Nothing (Null) or not. They are
not used to see if a Stream is open or not per se.
To check to see if you were passed Stream.Null or not you would use the Is
operator. However generally you should be writing your routines in such a
manner that it doesn't matter if you were passed a real Stream or
NetworkStream object, or the Stream.Null object.
Dim myStream As NetworkStream
If myStream Is Stream.Null Then
End If
Because NetworkStream inherits from Steam, you can use NetworkStream.Null
instead.
i'm passing Network streams between classes and i want to check if the
stream still is open.
I do not know how to verify if the stream itself is open or not. Its not
Stream.Null as Stream.Null is a shared field (not an instance property).
Hope this helps
Jay