I'm trying to get the following code to work in dotnet core running on ubuntu linux - but getting a "string does not contain a definition for copy" compile error on this line - where apparently String.Copy is not supported in dotnet-core:
Attendance = String.Copy(markers) };
What are the best ways of doing a shallow string copy in dotnet Core? Should I use string.CopyTo?
Thanks
//I want to add an initial marker to each record
//based on the number of dates specified
//I want the lowest overhead when creating a string for each record
string markers = string.Join("", dates.Select(p => 'U').ToArray());
return logs.Aggregate( new List<MonthlyAttendanceReportRow>(), (rows, log) => {
var match = rows.FirstOrDefault(p => p.EmployeeNo == log.EmployeeNo);
if (match == null) {
match = new MonthlyAttendanceReportRow() {
EmployeeNo = log.EmployeeNo,
Name = log.FirstName + " " + log.LastName,
Attendance = String.Copy(markers) };
rows.Add(match);
} else {
}
return rows;
});