Converting Stream to String and back

I have just tested this and works fine. string test = “Testing 1-2-3”; // convert string to stream byte[] byteArray = Encoding.ASCII.GetBytes(test); MemoryStream stream = new MemoryStream(byteArray); // convert stream to string StreamReader reader = new StreamReader(stream); string text = reader.ReadToEnd(); If stream has already been written to, you might want to seek to the … Read more

Converting Stream to String and back…what are we missing?

I have just tested this and works fine. string test = “Testing 1-2-3”; // convert string to stream byte[] byteArray = Encoding.ASCII.GetBytes(test); MemoryStream stream = new MemoryStream(byteArray); // convert stream to string StreamReader reader = new StreamReader(stream); string text = reader.ReadToEnd(); If stream has already been written to, you might want to seek to the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)