【发布时间】:2023-04-07 04:14:01
【问题描述】:
我在下面代码的 ToList() 行中遇到上述错误
if (emailReplyTo != null)
{
System.Collections.Generic.List<String> replyto
= emailReplyTo
// Strip uneccessary spaces
.Replace(", ", ",")
.Split(',')
.ToList();
request.WithReplyToAddresses(emailReplyTo);
}
我在文件顶部包含了using System.Collections;。
目标框架是3.5,为什么会报错?
【问题讨论】:
-
如果有人遇到同样的问题,请深入查看
Output窗口。因为Error窗口有时可能会产生误导。