这是个邮件接收程序中的点击阅读邮件部分的代码,
其中着一样提示
if (str1.Trim().Length != 0)
提示System.Array并不包含Trim的定义这一行提示
if (str1.Substring(0, 2).ToLower() == "to")
System.Array并不包含Substring的定义请问这个该怎么修改啊
按钮相应时间代码如下:String strTemp;
            content = "";
            this.richTextBox1.Clear();
            try
            {
                string str = this.listBox1.SelectedItem.ToString();
                str = str.Substring(1, str.IndexOf("封") - 1);
                Data = "RETR " + str;
                sw.WriteLine(Data);
                sw.Flush();
                strTemp = sr.ReadLine();
                if (strTemp[0] != '-')
                {
                    while (strTemp != ".")
                    {
                        content += strTemp + CRLF;
                        strTemp = sr.ReadLine();
                    }
                }
                else
                {
                    this.listBox2.Items.Add(strTemp);
                }
                char[] seperator = { '\n' };
                string[] str1 = content.Trim().Split(seperator);
                for (int i = 0; i <= 9; i++)
                {
                    if (str1.Trim().Length != 0)//这一行有错误 提示System.Array并不包含Trim的定义
                    {
                        if (str1.Substring(0, 2).ToLower() == "to")//这一行的错误提示 System.Array并不包含Substring的定义
                        {
                            this.richTextBox1.Text += "发送到" + str1.Substring(2, str1.Length - 2);
                        }
                        if (str1.Substring(0, 4).ToLower() == "from")
                        {
                            this.richTextBox1.Text += "来自" + str1.Substring(4, str1.Length - 4);
                        }
                        if (str1.Substring(0, 7).ToLower() == "subject")
                        {
                            this.richTextBox1.Text += "标题" + str1.Substring(7, str1.Length - 7);
                        }
                        if (str1.Substring(0, 4).ToLower() == "date")
                        {
                            this.richTextBox1.Text += "日期" + str1.Substring(4, str1.Length - 4);
                        }
                    }
                }
                this.richTextBox1.Text += "内容: " + CRLF;
                for (int j = 12; j < str1.Length; j++)
                {
                    if (str1[j].Trim().Length != 0)
                    {
                        this.richTextBox1.Text += str1[j];
                    }
                }
            }
            catch
            {
                this.listBox2.Items.Add("ERROR!");
            }请大家帮下忙,谢谢