ClosedXML.Report icon indicating copy to clipboard operation
ClosedXML.Report copied to clipboard

Problem with record at https://docs.closedxml.io/en/latest/features/tables.html#table-name

Open abergquist opened this issue 1 year ago • 0 comments

With respect to the following line of code at https://docs.closedxml.io/en/latest/features/tables.html#table-name:

record Pastry(string Name, int Sales);

I'm getting the following error:

CS0246: The type or namespace name 'record' could not be found (are you missing a using directive or an assembly reference?)

Replacing the above line of code with the following line of code:

public record struct Pastry(string Name, int Sales);

resolved the issue for me.

abergquist avatar Apr 26 '24 04:04 abergquist