I have a record type which occurs quite often in a nested complex data structure. Because the record type has an automatically generated ToString
the ToString
of my bigger structure becomes way to confusing and I do not care for the string representation of my record.
So I want to have an empty string as representation for my record. Overriding ToString
seems to not do anything, using StructuredFormatDisplay
does not work with empty strings since it requires an input of the form "Text {Field} Text"
. Right now I have
[<StructuredFormatDisplay("{}")>]
type MyRecord
{ 5 fields... }
override __.ToString () = ""
But this results in The method MyRecord.ToString could not be found
.
So what is the correct way to not have a string representation for a record type?