这是我删除邮件的代码。但是,它不起作用,
public object Delete(int index)
{
StreamWriter.WriteLine("$ DELE {0}"+index);
StreamWriter.Flush();
return Response();
}
private string Response()
{
byte[] data = new byte[TcpClient.ReceiveBufferSize];
int ret = NetworkStream.Read(data, 0, data.Length);
return Encoding.ASCII.GetString(data).TrimEnd();
}