Mega Code Archive

 
Categories / VB.Net / File Directory
 

Display Integer read from a StreamReader in hex format

Imports System Imports System.IO Class StrmRdrRead    Public Shared Sub Main()       Dim MyFile As New FileInfo("c:\csc.txt")       Dim sr As StreamReader = MyFile.OpenText()       Dim FirstChar As Integer = sr.Read()       Console.WriteLine("{0:D}        {1:X} ", FirstChar, FirstChar)       sr.Close()    End Sub End Class