How to Solve System.FormatException??
问题 Tell me how to fix this Exception please, when the transfer occurs between the PC. Exception Thrown : (System.FormatException) A System.FormatException was thrown: "Input string had an incorrect format." In Line : fileSize = Convert.ToInt32(Encoding.UTF8.GetString(byteFileSize)); My whole Code : private void Server() { FileStream fs = null; BinaryWriter bw = null; int fileSize = 0; int bytesReceived = 0; int bufferInt = Int32.Parse(textBoxBYTE2.Text); byte[] bufferByte = new byte[bufferInt];