DateTime
namedのコレクションがありreportLogs
ます。this からCollection<T>
ofを作成する必要があります。それを行う最も効率的な方法は何ですか?ShortDateString
Collection<DateTime>
Collection<DateTime> reportLogs = reportBL.GetReportLogs(1, null, null);
Collection<string> logDates = new Collection<string>();
foreach (DateTime log in reportLogs)
{
string sentDate = log.ToShortDateString();
logDates.Add(sentDate);
}
編集:
質問はCollection of string
;についてです。ついておりませんList of string
。string の Collection をどのように処理できますか?
参考: