How do you set a character equal to the "end of file" character?
dim c as char = ?????
Printable View
How do you set a character equal to the "end of file" character?
dim c as char = ?????
VB Code:
Dim c As Char = Convert.ToChar(0)
:wave:
that is end of line, I need end of file
No, it isnt. End of line is char 13 and char 10.Quote:
Originally Posted by Skydiver78
After running
Dim c As Char = Convert.ToChar(0)
c is nothing
VB Code:
debug.print(cstr(convert.toint32(c)))
edit*
Why dont you try the code before wasting any more of my time :rolleyes:
I did run the code,
Dim c As Char = Convert.ToChar(0)
returned a value of NOTHING for c
Yep, just ran it again...NOTHING!
I appreciate you trying however.
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim c As Char = Convert.ToChar(0) Debug.Print(CStr(Convert.ToInt32(c))) End Sub
Look, using this code it will say 0. I assume it converts 0 to nothing, I dont know. It still retains its value of zero. That is the null char that ends a file.