c# MailMessage 对象问题

标签 c#

我有一个名为 message 的 MailMessage 对象。

我正在尝试创建 message.Body,但我只有一个 IList 来填充它。

在正文中我想要以下内容:

"The following files could not be converted-" + IList<string> testlist

??????

最佳答案

StringBuilder builder = new StringBuilder("The following files could not be converted-\n");
foreach(string s in testlist)
    builder.AppendFormat("{0}\n", s);

string body = builder.ToString();

关于c# MailMessage 对象问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4261303/

相关文章:

c# - "Warning CS1684: Reference to type X claims it is defined in .. but it could not be found"

c# - Entity Framework : Unable to call stored procedure,错误的代码生成

c# - 使用列表和并行循环时出现异常

c# - 每个 HttpContext 实例一个对象

c# - 哪些是了解 C#、ASP.NET、LINQ、SQL、C++、Ruby、Java、Python 最新信息的最佳博客?

c# - 我应该有一个比它的语句长的方法名吗?

c# - 延迟加载和Thread.MemoryBarrier的使用

c# - Silverlight 嵌套自定义控件导致 StackOverflowException

c# - 如何在 .mdf 数据库上执行参数化选择查询并显示列值?

c# - 我应该在哪里启动 DirectX 以便在 C# 中简单使用?