Da String a MemoryStream
Dim _string As String = "Stringa da convertire" Dim _bytes As Byte() = System.Text.Encoding.UTF8.GetBytes(_string) Dim _memoryStream As New System.IO.MemoryStream(_bytes)
Da MemoryStream a String
Dim _bytes As Byte() = _memoryStream.ToArray Dim _string As String = System.Text.Encoding.UTF8.GetString(_bytes)