static void Main(string[] args) { //Start ServerSide acknowledge byte[] resp = Encoding.ASCII.GetBytes("INIT"); sendData(resp); while (true) { TEST test = new TEST(); Console.WriteLine(""); Console.WriteLine("ReadLine : "); test.aString = Console.ReadLine(); test.number = 10; test.innerTestArray = null; test.Buffer = null; byte[] arr = structToBytes(test); sendData(arr); } }