1
試圖將列表屬性轉換爲字符串,任何想法?轉換列表爲單個字符串
public class ContactLog
{
public string To { get; set; }
public string Message { get; set; }
public string FormattedMessage
{
get { return To+ ',' + Message; }
}
}
public void SendBatch(List<ContactLog> logs)
{
//Problem Line
string messages = CreateBulkMessage(logs.Select(o => o.FormattedMessage));
}
public string CreateBulkMessage(string message)
{
//Do Stuff
}
你的意思是你想* *連載您的列表? – kskyriacou