I wrote a simple class that does the same as TextReader.ReadLine. It returns a string, just like TextReader.ReadLine.
The return value from TextReader.ReadLine can be compared to Null, so for example in a loop:
Now I am trying to do the same with my ReadLine from my custom class, but so far been unable to do so.
It is not a major problem as I make my class ReadLine return an empty string and do:
But I would like to make the 2 behave the same.
Tried lots of things, eg make it return Null, make it return an un-initialized object etc. but so far no success yet.
Any idea how this can be done?
RBS
The return value from TextReader.ReadLine can be compared to Null, so for example in a loop:
B4X:
str = oTR.ReadLine
If str = Null Then Exit
Now I am trying to do the same with my ReadLine from my custom class, but so far been unable to do so.
It is not a major problem as I make my class ReadLine return an empty string and do:
B4X:
str = clsTR.ReadLine
If str.Length = 0 Then Exit
But I would like to make the 2 behave the same.
Tried lots of things, eg make it return Null, make it return an un-initialized object etc. but so far no success yet.
Any idea how this can be done?
RBS