How can I define a CsvRecord in CsvHelper 34 with a primary constructor that takes an object?
I'm migrating a (.NET 10) project from CsvHelper 33.1 to 34.0. Using the migration guide I've updated a CSV-specific class, that's used only for writing a CSV file, from the following: public class CsvTargetFrameworkResult(TargetFrameworkResult targetFrameworkResult) { public string? ProjectName { get; set; } = targetFrameworkResult.Project?.Name; public string? RepositoryName { get; set; } = targetFrameworkResult.Repository?.Name; public string? Path { get; set; } = targetFrameworkResult.Path; public string Version { get; set; } = string.Join(';', targetFrameworkResult.TargetFrameworks); } to
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.