G
George Baburanos
Hi,
On my Function "ObjectToString" the code line >>>
System.Text.Encoding.UTF8.GetString(by) NOT works why ?
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Private Function ObjectToString(ByVal obj As Object) As String
Dim strString As String = "", i As Integer
Dim formatter As New
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
Dim stream As New System.IO.MemoryStream
formatter.Serialize(stream, fntMainFont)
If stream.CanRead Then
Dim by() As Byte = stream.ToArray()
'this WORKS
For i = 0 To stream.Length - 1
strString += by(i).ToString
Next
'this NOT works why ??? >>>> strString =
System.Text.Encoding.UTF8.GetString(by)
End If
stream.Close()
stream = Nothing
formatter = Nothing
Return strString
End Function
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Thank you
George Baburanos
Greece
On my Function "ObjectToString" the code line >>>
System.Text.Encoding.UTF8.GetString(by) NOT works why ?
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Private Function ObjectToString(ByVal obj As Object) As String
Dim strString As String = "", i As Integer
Dim formatter As New
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
Dim stream As New System.IO.MemoryStream
formatter.Serialize(stream, fntMainFont)
If stream.CanRead Then
Dim by() As Byte = stream.ToArray()
'this WORKS
For i = 0 To stream.Length - 1
strString += by(i).ToString
Next
'this NOT works why ??? >>>> strString =
System.Text.Encoding.UTF8.GetString(by)
End If
stream.Close()
stream = Nothing
formatter = Nothing
Return strString
End Function
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Thank you
George Baburanos
Greece