请如何在此代码中显示正文文本并将其保存为文本文件. [英] Please how to display in this code the body text and save this text as a text file.

查看:79
本文介绍了请如何在此代码中显示正文文本并将其保存为文本文件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在此代码中成功显示了联系方式,例如电子邮件地址.问题是,
我如何显示正文文本并将其另存为文本文件.
同样,但后来我需要逐行搜索并在致以最诚挚的问候后显示文字,我是指发件人的签名.
代码在这里.

Hii everyone ,

i success in this code to display contact details such as email address.the question is,
How i can display the the body text and save this as text file.
also but later i need to search line by line and display text after such as best regards i mean signature of sender .
the code is here.

RequestSettings logininfo = new RequestSettings("",textBox1 .Text ,textBox2 .Text);
logininfo.AutoPaging = true;
ContactsRequest crequest=new ContactsRequest(logininfo) ;
Feed<contact> feedcontacts = crequest.GetContacts();
foreach (Contact gmailAddresses in feedcontacts.Entries)
{
   Console.WriteLine("\t" + gmailAddresses.Title);
   listBox1.Items.Add(gmailAddresses.Title);
   foreach (EMail emailId in gmailAddresses.Emails) 
   {
      Console.WriteLine("\t" + emailId.Address);
      listBox1.Items.Add(" " + emailId.Address);
   }
}

推荐答案

此链接可能有助于您入门:
如何写入文本文件 [
This link may help get you started:
How to write to a text file[^]


这篇关于请如何在此代码中显示正文文本并将其保存为文本文件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆