error when again press button in xamrain c#>>>THIS CODE

button = FindViewById<Button>(Resource.Id.button1); button.Click += delegate { string textToSend = "hi"; //---create a TCPClient object at the IP and port no.--- TcpClient client = new TcpClient("", 5555); NetworkStream nwStream = client.GetStream(); byte[] bytesToSend = ASCIIEncoding.ASCII.GetBytes(textToSend); //---send the text--- nwStream.Write(bytesToSend, 0, bytesToSend.Length); //---read back the text--- client.Close(); nwStream.Close(); };

10/21/2018 2:29:43 PM


1 Answer

New Answer


what is description of the error, you have? I think, stream no closing