richTextBox1 += richTextBox2 解决方法

本文档提供了一个使用C#进行邮件内容解析的示例代码。通过DataRow获取邮件的图片内容,并设置richtextbox来展示邮件的具体信息,包括发件人、发送日期等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

            DataRow dr = fr_DataLayer.DsForm.FormBody.Rows[0];     

            byte[] MyData= new byte[0];

            MyData = (byte[])dr["ContentImage"];

            int ArraySize = new int();

            ArraySize = MyData.GetUpperBound(0);

            long bytesReceived = MyData.Length;

            ASCIIEncoding encoding = new ASCIIEncoding(); 

           

            this.richTextBox1.Text += "------------------------原文信息-------------------"n";

            this.richTextBox1.Text += "發件人:"+"HW"n";

            this.richTextBox1.Text += "發件日期:"+"2007-03-24 12:12:12"n";

            this.richTextBox1.Text += " 送:"+"WYY"n";

            this.richTextBox1.Text += " 送:"+""n";

            this.richTextBox1.Text += " 旨:"+"關於更改農行事宜"n";

            this.richTextBox1.Text += "---------------------------------------------------"n";

            this.richTextBox1.Text +="內容如下:"+""n";

            this.richTextBox1.SelectionStart = this.richTextBox1.Text.Length;

            this.richTextBox1.SelectedRtf = encoding

转载于:https://www.cnblogs.com/lanye-apurple/archive/2008/05/23/1206079.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值